簡體   English   中英

如何在 Windows 下構建 SpiderMonkey?

[英]How to build SpiderMonkey under Windows?

我嘗試在 Windows 下構建 SpiderMonkey。 我遵循https://wiki.mozilla.org/JavaScript:New_to_SpiderMonkey下的文檔

我已經從https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Windows_Prerequisites安裝了先決條件

不同的是,我使用當前的 VS 15.9.11 而不是舊的 15.8。

如果我嘗試在 Mozilla 構建 shell 中調用configure ,那么它找不到 c 編譯器:

Winuser@Winuser /c/workspace-cpp/spidermonkey/js/src/build_DBG.OBJ
$ ../configure --enable-debug --disable-optimize
Reexecuting in the virtualenv
checking for vcs source checkout... hg
checking for a shell... C:/mozilla-build/msys/bin/sh.exe
checking for host system type... x86_64-pc-mingw32
checking for target system type... x86_64-pc-mingw32
checking for Python 3... C:/mozilla-build//python3/python3.exe (3.6.5)
checking for hg... c:/mozilla-build/python/Scripts/hg.exe
checking for Mercurial version... 4.5.3
checking for sparse checkout... no
checking whether cross compiling... no
checking for yasm... c:/mozilla-build/bin/yasm.exe
checking yasm version... 1.3.0
checking for the target C compiler... not found
DEBUG: _cc: Trying clang-cl
DEBUG: _cc: Trying gcc
DEBUG: _cc: Trying clang
ERROR: Cannot find the target C compiler

Mozilla 構建 shell 在哪里搜索 C 編譯器? 問題的原因是什么? 3 種可能的 C 編譯器中的哪一種來自 VS?

我(最終)得到了它的構建。 我花了幾天時間。

除了 mozillas spidermonkey 文檔之外,我還使用了這些說明。

https://github.com/TheQwertiest/foo_spider_monkey_panel/wiki/Building-SpiderMonkey

我將列出一些需要記住的重要事項。

  • x86 Native Tools Command Prompt for VS2017啟動x86 Native Tools Command Prompt for VS2017
  • 在 VS2017 cmd 提示中set MOZ_NO_RESET_PATH=1
  • 在 VS2017 cmd 提示符下啟動 minGW mozilla-build/start-shell.bat
  • 下載舊版 Autconf 並編譯它http://www.linuxfromscratch.org/blfs/view/cvs/general/autoconf213.html
  • 克隆 esr60 分支代碼。 我嘗試了最新的代碼,我嘗試了最新發布的代碼,但它必須到這個分支才能編譯。

所以強調沒有這些要點,這些鏈接的說明可能會起作用。

以上答案中的說明已移至新位置https://theqwertiest.github.io/foo_spider_monkey_panel/docs/for_developers/building_spidermonkey

PS:esr68 分支(以及 master 分支)的構建過程略有不同,需要額外的補丁才能與 MSVC 兼容。 一旦我開始使用相應的分支,鏈接的指令就會更新。

PPS:由於缺少代表,我不得不發布答案而不是發表評論。

PPPS:從沒想過有人會實際使用本指南 =)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM