From 6da64bf3545ff4eeb472a11dcbf591dd28caef57 Mon Sep 17 00:00:00 2001 From: wraitii Date: Sun, 6 Dec 2020 14:00:57 +0000 Subject: [PATCH] [SM78 1/2] Upgrade Spidermonkey build system and binaries to 78.6.0 SM78 drops usage of Python 2 in favour of Python 3. SM78 is the first ESR to actually use rust, which means a new static library is bundled. This means LLVM-objdump is now a dependency of Spidermonkey, and also 0 A.D. SM78 also removes the need for NSPR on Windows (Bug 1556646). Tested by: Stan, Freagarach, mammadori Refs #5694 Refs #5861 Differential Revision: https://code.wildfiregames.com/D3167 This was SVN commit r24332. --- build/premake/extern_libs5.lua | 17 +++++++++++------ source/scriptinterface/ScriptTypes.h | 4 ++-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/build/premake/extern_libs5.lua b/build/premake/extern_libs5.lua index 588ce9b7c2..72c238787a 100644 --- a/build/premake/extern_libs5.lua +++ b/build/premake/extern_libs5.lua @@ -585,7 +585,7 @@ extern_lib_defs = { compile_settings = function() if _OPTIONS["with-system-mozjs"] then if not _OPTIONS["android"] then - pkgconfig.add_includes("mozjs-68") + pkgconfig.add_includes("mozjs-78") end else if os.istarget("windows") then @@ -605,15 +605,20 @@ extern_lib_defs = { link_settings = function() if _OPTIONS["with-system-mozjs"] then if _OPTIONS["android"] then - links { "mozjs-68" } + links { "mozjs-78" } else - pkgconfig.add_links("mozjs-68") + pkgconfig.add_links("mozjs-78") end else - filter { "Debug" } - links { "mozjs68-ps-debug" } + filter { "Debug", "action:vs*" } + links { "mozjs78-ps-debug" } + links { "mozjs78-ps-rust-debug" } + filter { "Debug", "action:not vs*" } + links { "mozjs78-ps-debug" } + links { "mozjs78-ps-rust" } filter { "Release" } - links { "mozjs68-ps-release" } + links { "mozjs78-ps-release" } + links { "mozjs78-ps-rust" } filter { } add_source_lib_paths("spidermonkey") end diff --git a/source/scriptinterface/ScriptTypes.h b/source/scriptinterface/ScriptTypes.h index f0033fab86..8de1a8ee89 100644 --- a/source/scriptinterface/ScriptTypes.h +++ b/source/scriptinterface/ScriptTypes.h @@ -73,7 +73,7 @@ # pragma GCC diagnostic pop #endif -#if MOZJS_MAJOR_VERSION != 68 +#if MOZJS_MAJOR_VERSION != 78 #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 \ @@ -81,7 +81,7 @@ system-installed version. Make sure you have got all the right files and \ include paths. #endif -#if MOZJS_MINOR_VERSION != 12 +#if MOZJS_MINOR_VERSION != 6 #error Your compiler is trying to use an untested minor version of the \ SpiderMonkey library. If you are a package maintainer, please make sure \ to check very carefully that this version does not change the behaviour \