1
0
forked from mirrors/0ad

[SM60 1/2] Upgrade Spidermonkey build system and binaries to 60.9.1

This changes VS to use the same library name as other platforms, since
the toolsets are binary-compatible going forward. This makes the build
script slightly more streamlined on windows.
Also enable building NSPR on windows as part of the spidermonkey build,
instead of compiling it separately.

Tested by: SubitaNeo, Stan
Refs #5859

Differential Revision: https://code.wildfiregames.com/D3115
This was SVN commit r24242.
This commit is contained in:
wraitii
2020-11-24 15:41:52 +00:00
parent a226c4804e
commit f2cf2c97ad
5 changed files with 21 additions and 19 deletions
+9 -13
View File
@@ -538,9 +538,9 @@ extern_lib_defs = {
},
spidermonkey = {
compile_settings = function()
if _OPTIONS["with-system-mozjs52"] then
if _OPTIONS["with-system-mozjs"] then
if not _OPTIONS["android"] then
pkgconfig.add_includes("mozjs-52")
pkgconfig.add_includes("mozjs-60")
end
else
if os.istarget("windows") then
@@ -558,21 +558,17 @@ extern_lib_defs = {
end
end,
link_settings = function()
if _OPTIONS["with-system-mozjs52"] then
if _OPTIONS["with-system-mozjs"] then
if _OPTIONS["android"] then
links { "mozjs-52" }
links { "mozjs-60" }
else
pkgconfig.add_links("mozjs-52")
pkgconfig.add_links("mozjs-60")
end
else
filter { "Debug", "action:vs*" }
links { "mozjs52-ps-debug-vc140" }
filter { "Release", "action:vs*" }
links { "mozjs52-ps-release-vc140" }
filter { "Debug", "action:not vs*" }
links { "mozjs52-ps-debug" }
filter { "Release", "action:not vs*" }
links { "mozjs52-ps-release" }
filter { "Debug" }
links { "mozjs60-ps-debug" }
filter { "Release" }
links { "mozjs60-ps-release" }
filter { }
add_source_lib_paths("spidermonkey")
end
+1 -1
View File
@@ -6,7 +6,7 @@ newoption { trigger = "icc", description = "Use Intel C++ Compiler (Linux only;
newoption { trigger = "jenkins-tests", description = "Configure CxxTest to use the XmlPrinter runner which produces Jenkins-compatible output" }
newoption { trigger = "minimal-flags", description = "Only set compiler/linker flags that are really needed. Has no effect on Windows builds" }
newoption { trigger = "outpath", description = "Location for generated project files" }
newoption { trigger = "with-system-mozjs52", description = "Search standard paths for libmozjs52, instead of using bundled copy" }
newoption { trigger = "with-system-mozjs", description = "Search standard paths for libmozjs60, instead of using bundled copy" }
newoption { trigger = "with-system-nvtt", description = "Search standard paths for nvidia-texture-tools library, instead of using bundled copy" }
newoption { trigger = "without-audio", description = "Disable use of OpenAL/Ogg/Vorbis APIs" }
newoption { trigger = "without-lobby", description = "Disable the use of gloox and the multiplayer lobby" }
+7 -1
View File
@@ -33,11 +33,17 @@ if [ "$preserve_libs" != "true" ]; then
(cd ../../libraries/source/fcollada/src && rm -rf ./output)
(cd ../../libraries/source/nvtt/src && rm -rf ./build)
(cd ../../libraries/source/spidermonkey && rm -f .already-built)
(cd ../../libraries/source/spidermonkey && rm -rf ./mozjs-45.0.2)
(cd ../../libraries/source/spidermonkey && rm -rf ./lib)
(cd ../../libraries/source/spidermonkey && rm -rf ./include-unix-debug)
(cd ../../libraries/source/spidermonkey && rm -rf ./include-unix-release)
(cd ../../libraries/source/spidermonkey && rm -rf ./mozjs-62.9.1)
fi
# Still delete the directory of previous SpiderMonkey versions to
# avoid wasting disk space if people clean workspaces after updating.
(cd ../../libraries/source/spidermonkey && rm -rf ./mozjs-52.9.1pre1)
(cd ../../libraries/source/spidermonkey && rm -rf ./mozjs-45.0.2)
(cd ../../libraries/source/spidermonkey && rm -rf ./mozjs-38.0.0)
(cd ../../libraries/source/spidermonkey && rm -rf ./mozjs-38.0.0)
(cd ../../libraries/source/spidermonkey && rm -rf ./mozjs31)
(cd ../../libraries/source/spidermonkey && rm -rf ./mozjs24)
+3 -3
View File
@@ -41,7 +41,7 @@ premake_args=""
with_system_premake5=false
without_nvtt=false
with_system_nvtt=false
with_system_mozjs52=false
with_system_mozjs=false
enable_atlas=true
for i in "$@"
@@ -50,7 +50,7 @@ do
--with-system-premake5 ) with_system_premake5=true ;;
--without-nvtt ) without_nvtt=true; premake_args="${premake_args} --without-nvtt" ;;
--with-system-nvtt ) with_system_nvtt=true; premake_args="${premake_args} --with-system-nvtt" ;;
--with-system-mozjs52 ) with_system_mozjs52=true; premake_args="${premake_args} --with-system-mozjs52" ;;
--with-system-mozjs ) with_system_mozjs=true; premake_args="${premake_args} --with-system-mozjs" ;;
--enable-atlas ) enable_atlas=true ;;
--disable-atlas ) enable_atlas=false ;;
-j* ) JOBS=$i ;;
@@ -87,7 +87,7 @@ if [ "`uname -s`" != "Darwin" ]; then
# Build/update bundled external libraries
(cd ../../libraries/source/fcollada/src && ${MAKE} ${JOBS}) || die "FCollada build failed"
echo
if [ "$with_system_mozjs52" = "false" ]; then
if [ "$with_system_mozjs" = "false" ]; then
(cd ../../libraries/source/spidermonkey && MAKE=${MAKE} JOBS=${JOBS} ./build.sh) || die "SpiderMonkey build failed"
fi
echo
+1 -1
View File
@@ -73,7 +73,7 @@
# pragma GCC diagnostic pop
#endif
#if MOZJS_MAJOR_VERSION != 52
#if MOZJS_MAJOR_VERSION != 60
#error Your compiler is trying to use an incorrect major version of the \
SpiderMonkey library. The only version that works is the one in the \
libraries/spidermonkey/ directory, and it will not work with a typical \