diff options
author | Job Bautista <jobbautista9@aol.com> | 2023-03-26 13:14:59 +0800 |
---|---|---|
committer | Job Bautista <jobbautista9@aol.com> | 2023-03-26 13:14:59 +0800 |
commit | f23839412e9467965de3d654124c97c4cb324c6f (patch) | |
tree | 4158d62f07ef760d2dd76990bd2ea9beec5f0cc9 /js/moz.configure | |
parent | 86b77f1284be339b6672f6ef9dcc342a3d6e758c (diff) | |
download | uxp-f23839412e9467965de3d654124c97c4cb324c6f.tar.gz |
Issue #62 - Always build Spidermonkey as shared lib in Windows.
Shared JS is confirmed working fine in Windows after a week of testing.
Non-Windows will have to wait unfortunately. The JS_SHARED_LIBRARY option is
kept for easy testing on those unsupported platforms.
Diffstat (limited to 'js/moz.configure')
-rw-r--r-- | js/moz.configure | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/js/moz.configure b/js/moz.configure index 7687731f99..f632edafec 100644 --- a/js/moz.configure +++ b/js/moz.configure @@ -44,8 +44,11 @@ js_option('--disable-shared-js', default=building_js, js_option('--disable-export-js', default=building_js, help='Do not mark JS symbols as DLL exported/visible') -@depends('--disable-shared-js', '--disable-export-js') -def shared_js(shared_js, export_js): +@depends('--disable-shared-js', '--disable-export-js', target) +def shared_js(shared_js, export_js, target): + # We want shared JS always be enabled on Windows regardless of the enable bool. + if target.os == 'WINNT': + return True if shared_js: if not export_js: die('Must export JS symbols when building a shared library.') @@ -61,16 +64,18 @@ def exportable_js_api(shared_js, export_js): set_define('STATIC_EXPORTABLE_JS_API', exportable_js_api) -@depends('--disable-shared-js', '--disable-export-js') -def static_js_api(shared_js, export_js): - if not shared_js and not export_js: +@depends('--disable-shared-js', '--disable-export-js', target) +def static_js_api(shared_js, export_js, target): + # Do not build JS as a static library on Windows, regardless of enable bool. + if (target.os != 'WINNT') and not shared_js and not export_js: return True set_define('STATIC_JS_API', static_js_api) -@depends('--disable-shared-js') -def static_js(value): - if not value: +@depends('--disable-shared-js', target) +def static_js(value, target): + # Do not build JS as a static library on Windows, regardless of enable bool. + if (target.os != 'WINNT') and not value: return True set_define('MOZ_STATIC_JS', static_js) |