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)