fune/toolkit/library/rust/gkrust-features.mozbuild
criss 592389ca2d Backed out 10 changesets (bug 1751331) for causing bustages. CLOSED TREE
Backed out changeset 5ce212465a26 (bug 1751331)
Backed out changeset 14d62b8ffa5a (bug 1751331)
Backed out changeset 76f46bd9afa1 (bug 1751331)
Backed out changeset 147faaad046f (bug 1751331)
Backed out changeset f85b049d12f9 (bug 1751331)
Backed out changeset 16d8d3f8378b (bug 1751331)
Backed out changeset 1cd9386a3927 (bug 1751331)
Backed out changeset 20faacba6db6 (bug 1751331)
Backed out changeset 7d17f75bcb38 (bug 1751331)
Backed out changeset 28b9aab1f174 (bug 1751331)
2022-01-25 13:00:25 +02:00

92 lines
2.8 KiB
Python

# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
gkrust_features = []
if CONFIG['NIGHTLY_BUILD']:
gkrust_features += ['gkrust-shared/moz_asserts_nightly']
if CONFIG['MOZ_DIAGNOSTIC_ASSERT_ENABLED']:
gkrust_features += ['gkrust-shared/moz_asserts_diagnostic']
if CONFIG['MOZ_DEBUG']:
gkrust_features += [
'gecko_debug',
'gecko_refcount_logging',
]
if CONFIG['MOZ_TSAN']:
gkrust_features += ['thread_sanitizer']
if CONFIG['MOZ_WEBRENDER_DEBUGGER']:
gkrust_features += ['webrender_debugger']
if CONFIG['MOZ_PULSEAUDIO']:
gkrust_features += ['cubeb_pulse_rust']
if CONFIG['MOZ_AUDIOUNIT_RUST']:
gkrust_features += ['cubeb_coreaudio_rust']
if CONFIG['MOZ_RUST_SIMD']:
gkrust_features += ['simd-accel']
# This feature is not yet supported on all platforms, and this check needs to
# match MOZ_CUBEB_REMOTING in CubebUtils.cpp.
if (CONFIG['OS_ARCH'] == 'Linux' and CONFIG['OS_TARGET'] != 'Android') or CONFIG['OS_ARCH'] == 'Darwin' or (CONFIG['OS_ARCH'] == 'WINNT' and CONFIG['CPU_ARCH'] != 'aarch64'):
gkrust_features += ['cubeb-remoting']
if CONFIG['MOZ_MEMORY']:
gkrust_features += ['moz_memory']
if CONFIG['MOZ_PLACES']:
gkrust_features += ['moz_places']
if CONFIG['ENABLE_WASM_CRANELIFT']:
gkrust_features += ['spidermonkey_rust']
if CONFIG['JS_CODEGEN_X86'] or CONFIG['JS_CODEGEN_X64']:
gkrust_features += ['cranelift_x86']
elif CONFIG['JS_CODEGEN_ARM']:
gkrust_features += ['cranelift_arm32']
elif CONFIG['JS_CODEGEN_ARM64']:
gkrust_features += ['cranelift_arm64']
else:
gkrust_features += ['cranelift_none']
if CONFIG['JS_ENABLE_SMOOSH']:
gkrust_features += ['smoosh']
if CONFIG['MOZ_GECKO_PROFILER']:
gkrust_features += ['gecko_profiler']
if CONFIG['MOZ_GECKO_PROFILER_PARSE_ELF']:
gkrust_features += ['gecko_profiler_parse_elf']
if CONFIG['MOZ_BITS_DOWNLOAD']:
gkrust_features += ['bitsdownload']
if CONFIG['MOZ_NEW_XULSTORE']:
gkrust_features += ['new_xulstore']
if CONFIG['LIBFUZZER']:
gkrust_features += ['libfuzzer']
if CONFIG['MOZ_WEBRTC']:
gkrust_features += ['webrtc']
# We need to tell Glean it is being built with Gecko.
gkrust_features += ['glean_with_gecko']
if not CONFIG['MOZILLA_OFFICIAL']:
gkrust_features += ['glean_disable_upload']
if CONFIG['MOZ_ENABLE_DBUS']:
gkrust_features += ['with_dbus']
if CONFIG["MOZ_CRASHREPORTER"] and CONFIG['MOZ_OXIDIZED_BREAKPAD']:
gkrust_features += ['oxidized_breakpad']
if CONFIG["MOZ_WEBMIDI_MIDIR_IMPL"]:
gkrust_features += ['webmidi_midir_impl']