[英]How to build SpiderMonkey under Windows?
我嘗試在 Windows 下構建 SpiderMonkey。 我遵循https://wiki.mozilla.org/JavaScript:New_to_SpiderMonkey下的文檔
不同的是,我使用當前的 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
set MOZ_NO_RESET_PATH=1
mozilla-build/start-shell.bat
所以強調沒有這些要點,這些鏈接的說明可能會起作用。
以上答案中的說明已移至新位置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.