25 Commits

Author SHA1 Message Date
Olivier Tilloy 6436ba3af9 Spidermonkey build: cherry-pick an upstream commit to create thin archives
This saves a sizeable amount of disk space during the build, by not creating
a very large libjs_static.a (~1.5 GB) that contains a copy of all the symbols
in the object files generated during the build.

Upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=2008085
Upstream commit: https://hg.mozilla.org/mozilla-central/rev/a924182c4e55

Note that the upstream commit doesn't apply cleanly to Spidermonkey 128.13.0,
it had to be rebased.
2026-01-25 10:58:33 +01:00
Olivier Tilloy 8bd0d0b84f Spidermonkey build: do not unpack unneeded test files
This change reduces the disk space requirement by 50%, from 1.1 GB down to 564 MB.
It is relevant when building 0AD in resource-constrained environments (e.g. in CI).
2025-12-31 13:34:09 +01:00
Ralph Sennhauser 4bf107352f Fix building spidermonkey with python 3.14
Fixes: #8427
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-10-11 15:47:45 +02:00
Itms 7fde47e1f3 Fix linker invocation on macOS Sequoia 2025-08-15 19:43:36 +02:00
Itms 758229558e Fix segfault during GUI GC 2025-08-15 19:43:36 +02:00
Itms 7038d87454 Update SpiderMonkey to ESR 128.13
Fixes #7662
2025-08-15 19:43:34 +02:00
Itms 733297a038 Fix use of pkg-config when building SM on macOS 2025-08-15 11:32:33 +02:00
Itms 03fff3572f Use conforming preprocessor with modern MSVC
https://learn.microsoft.com/en-us/cpp/preprocessor/preprocessor-experimental-overview
2025-08-04 17:35:48 +02:00
Ralph Sennhauser 895cb63c4a Add --build-archive to spidermonkey build.sh
This option allows to build the spidermonky archive hosted by WFG from
the upstream firefox tarball.

First this serves as documentation as to how the taball is created and
by integrating it into the regular build process allows to easely bump
spidermonky version for local testing.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-05-31 17:10:10 +02:00
phosit 40fe7df654 Silence dangling pointer warning for JS::Rooted
With much help by @sera.
2025-02-24 21:30:56 +01:00
Vincent Cheng 026a668a0f Make sure mozjs patch FixFpNormIssue.diff applies cleanly on i386 2025-02-15 12:46:08 +01:00
Martijn van Duren 2338473da1 Make libraries/*/build.sh use "${TAR}" instead of tar directly.
This allows systems using a tar version not supporting all the required
flags to easily switch to gnu tar.
2025-02-09 14:31:10 +01:00
Ralph Sennhauser f9a43c8c40 Add support for fetch-only for libraries
Used to prefetch all required tarballs to build pyrogenesis later
without network access as is common for Linux package build and some
other CI environments.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-01-20 16:58:37 +01:00
Ralph Sennhauser f97a1f1c54 Fix spidermonkey profiling build
Instruments is macOS only, so don't try to enable it on other platforms.

Also don't quote ${JOBS} as it might be unset and passing an empty
string to "mach build" may result in configure failing.

Fixes: #7470
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-01-08 07:32:59 +01:00
Lancelot de Ferrière a6693e8c1f Fix samply profiling of SM JS code 2024-12-30 09:13:06 +01:00
Stan d15f1c29e4 Unify library building logs 2024-12-15 15:41:37 +01:00
Dunedan 721e90ba6a Fix compilation of SM with recent Python versions
This adds a patch for a bug in SpiderMonkey, preventing compilation of
SpiderMonkey with Python >=3.12.8 and Python >=3.13.1. The bug is
tracked upstream in https://bugzilla.mozilla.org/show_bug.cgi?id=1935621
2024-12-10 22:51:31 +01:00
Itms 72ea129751 Fix SpiderMonkey debug DEFINEs in pkg-config 2024-12-09 10:46:13 +01:00
Itms 0de5f2fb25 Upgrade SpiderMonkey to ESR 115 2024-12-09 10:46:12 +01:00
Itms 6a5488832e Upgrade SpiderMonkey to ESR 102 2024-12-09 10:43:31 +01:00
Itms 2e32636a53 Use Mozilla's mach to build SpiderMonkey
This removes the need for many customizations in the build script.
2024-12-09 10:42:21 +01:00
Itms 88d3550aaa Fix SpiderMonkey build on Windows 2024-12-09 10:31:34 +01:00
Itms f88bac98b4 Fix SpiderMonkey build on recent macOS
Fixes #6905
Fixes #6915
2024-12-09 10:30:49 +01:00
Itms 682de9f289 Unbundle SpiderMonkey
This deletes the RETRY flag from the build script, which can be
manually mocked if needed.
2024-12-09 10:11:34 +01:00
Ralph Sennhauser 26994b156b Split source package downloads
Instead of fetching the whole svn repo containing all current
dependencies into source, fetch them individually into subdirectories of
source.

Adds a wrapper script to each package to place the build output where
it's currently expected.

This allows adding and removing dependencies as well as changing origin
of those packages on a case by case basis.

It's recommended to run "git clean -dxf libraries/source" to free up
extra space and remove untracked files no longer covered by changes in
.gitignore.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-09-08 22:17:08 +02:00