Bug 1675385 - Move architecture-dependent wasm prefs to static prefs. r=lth

We preserve their value, but by moving them to static prefs, we make
them embedded into the binary portion of the build, which means it's
allowed to differ between x86_64 and aarch64 in mac universal builds.

Differential Revision: https://phabricator.services.mozilla.com/D96522
This commit is contained in:
Mike Hommey 2020-11-12 07:09:48 +00:00
Родитель e45400e5b3
Коммит 5a1a34953a
4 изменённых файлов: 23 добавлений и 16 удалений

Просмотреть файл

@ -5171,6 +5171,26 @@
value: true
mirror: once
- name: javascript.options.wasm_optimizingjit
type: bool
#if defined(MOZ_AARCH64) && !defined(ENABLE_WASM_CRANELIFT)
value: false
#else
value: true
#endif
mirror: always
#if defined(ENABLE_WASM_SIMD)
- name: javascript.options.wasm_simd
type: bool
#if defined(NIGHTLY_BUILD)
value: true
#else
value: false
#endif
#endif
mirror: always
#---------------------------------------------------------------------------
# Prefs starting with "layers."
#---------------------------------------------------------------------------

Просмотреть файл

@ -1108,12 +1108,6 @@ pref("javascript.options.wasm_trustedprincipals", true);
pref("javascript.options.wasm_verbose", false);
pref("javascript.options.wasm_baselinejit", true);
#if defined(MOZ_AARCH64) && !defined(ENABLE_WASM_CRANELIFT)
pref("javascript.options.wasm_optimizingjit", false);
#else
pref("javascript.options.wasm_optimizingjit", true);
#endif
#ifdef ENABLE_WASM_REFTYPES
pref("javascript.options.wasm_reftypes", true);
pref("javascript.options.wasm_gc", false);
@ -1121,13 +1115,6 @@ pref("javascript.options.wasm_baselinejit", true);
#ifdef ENABLE_WASM_MULTI_VALUE
pref("javascript.options.wasm_multi_value", true);
#endif
#ifdef ENABLE_WASM_SIMD
#ifdef NIGHTLY_BUILD
pref("javascript.options.wasm_simd", true);
#else
pref("javascript.options.wasm_simd", false);
#endif
#endif
pref("javascript.options.native_regexp", true);
pref("javascript.options.parallel_parsing", true);
pref("javascript.options.source_pragmas", true);

Просмотреть файл

@ -373,6 +373,9 @@ def emit_code(fd, pref_list_filename):
if buildconfig.substs.get("MOZ_DEBUG"):
pp.context["DEBUG"] = "1"
if buildconfig.substs.get("CPU_ARCH") == "aarch64":
pp.context["MOZ_AARCH64"] = True
pp.out = StringIO()
pp.do_filter("substitution")
pp.do_include(pref_list_filename)

Просмотреть файл

@ -153,9 +153,6 @@ if CONFIG["MOZ_SERVICES_SYNC"]:
if CONFIG["MOZ_BUILD_APP"] == "browser":
DEFINES["MOZ_BUILD_APP_IS_BROWSER"] = True
if CONFIG["CPU_ARCH"] == "aarch64":
DEFINES["MOZ_AARCH64"] = True
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
if not CONFIG["MOZ_ANDROID_FAT_AAR_ARCHITECTURES"]:
FINAL_TARGET_PP_FILES[CONFIG["ANDROID_CPU_ARCH"]] += [