1
0
forked from mirrors/0ad

Fix SpiderMonkey build on Windows

This commit is contained in:
Itms
2024-10-13 14:06:48 +02:00
parent f88bac98b4
commit 88d3550aaa
2 changed files with 45 additions and 0 deletions
@@ -0,0 +1,41 @@
# HG changeset patch
# User Mike Hommey <mh+mozilla@glandium.org>
# Date 1684810882 0
# Node ID 9c84e12328a105874d1769800bb132e78befc8b2
# Parent 1e6bdb2d359480234077ac0ec5592dced8184921
Bug 1802675 - Don't build winheap.cpp when mozglue is a static library. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D163383
diff --git a/memory/mozalloc/moz.build b/memory/mozalloc/moz.build
--- a/memory/mozalloc/moz.build
+++ b/memory/mozalloc/moz.build
@@ -17,20 +17,22 @@ if CONFIG["WRAP_STL_INCLUDES"]:
EXPORTS.mozilla += ["throw_gcc.h"]
elif CONFIG["CC_TYPE"] == "clang-cl":
DEFINES["_HAS_EXCEPTIONS"] = 0
SOURCES += [
"msvc_raise_wrappers.cpp",
]
if CONFIG["OS_TARGET"] == "WINNT":
- # Keep this file separate to avoid #include'ing windows.h everywhere.
- SOURCES += [
- "winheap.cpp",
- ]
+ # Don't build winheap.cpp when mozglue is a static library.
+ if CONFIG["MOZ_MEMORY"] or not CONFIG["JS_STANDALONE"]:
+ # Keep this file separate to avoid #include'ing windows.h everywhere.
+ SOURCES += [
+ "winheap.cpp",
+ ]
UNIFIED_SOURCES += [
"mozalloc.cpp",
"mozalloc_oom.cpp",
]
SOURCES += [
"mozalloc_abort.cpp",
@@ -14,6 +14,10 @@ patch -p1 <"${PATCHES}"/FixRustLinkage.diff
# Differentiate debug/release library names.
patch -p1 <"${PATCHES}"/FixLibNames.diff
# Fix Windows build, fixed in ESR 115
# https://bugzilla.mozilla.org/show_bug.cgi?id=1802675
patch -p1 <"${PATCHES}"/FixWinHeap.diff
# There is an issue on 32-bit linux builds sometimes.
# NB: the patch here is Comment 21 modified by Comment 25
# but that seems to imperfectly fix the issue with GCC.