summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorJob Bautista <jobbautista9@aol.com>2023-04-22 10:39:55 +0800
committerJob Bautista <jobbautista9@aol.com>2023-04-30 21:10:44 +0800
commit42e0b5db07314ff752e5dbe7cde8d3125a26f2d0 (patch)
tree610d19d0b9817dc7c5c9e3c6d053fdf31961fcc9 /config
parent4d4d8cfc9f73d48208afcfde9216fcddf9aecec3 (diff)
downloaduxp-42e0b5db07314ff752e5dbe7cde8d3125a26f2d0.tar.gz
Issue #2221 - Enable link-time optimization for Spidermonkey by default if building it shared.
Currently only Windows can take advantage of this. The reason why the arrays of deunified sources are named like that in Spidermonkey's moz.build is to avoid UnsortedErrors in python. There's probably a better way to handle that, but I just want something that works for now. And yes, the deunified sources will be reunified if LTO is disabled.
Diffstat (limited to 'config')
-rw-r--r--config/external/ffi/moz.build6
1 files changed, 6 insertions, 0 deletions
diff --git a/config/external/ffi/moz.build b/config/external/ffi/moz.build
index 168f28c0bf..8710ebab7a 100644
--- a/config/external/ffi/moz.build
+++ b/config/external/ffi/moz.build
@@ -128,3 +128,9 @@ else:
'/js/src/ctypes/libffi/src/%s/%s' % (CONFIG['FFI_TARGET_DIR'], s)
for s in sorted(ffi_srcs)
]
+
+ # Explicitly enable WPO and LTCG in MSVC if we're doing LTO.
+ if CONFIG['JS_LTO']:
+ if CONFIG['_MSC_VER'] and not CONFIG['CLANG_CL']:
+ CFLAGS += [ '-GL' ]
+ CXXFLAGS += [ '-GL' ]