summaryrefslogtreecommitdiff
path: root/modules
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 /modules
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 'modules')
-rw-r--r--modules/fdlibm/src/moz.build6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/fdlibm/src/moz.build b/modules/fdlibm/src/moz.build
index 541f840399..d1feeb62f9 100644
--- a/modules/fdlibm/src/moz.build
+++ b/modules/fdlibm/src/moz.build
@@ -38,6 +38,12 @@ if CONFIG['CC_TYPE'] == 'clang-cl':
'-Wno-sign-compare', # signed/unsigned mismatch
]
+# 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' ]
+
SOURCES += [
'e_acos.cpp',
'e_acosh.cpp',