1# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- 2# vim: set filetype=python: 3# This Source Code Form is subject to the terms of the Mozilla Public 4# License, v. 2.0. If a copy of the MPL was not distributed with this 5# file, You can obtain one at http://mozilla.org/MPL/2.0/. 6 7gkrust_features = [] 8 9if CONFIG['MOZ_DEBUG']: 10 gkrust_features += [ 11 'gecko_debug', 12 'gecko_refcount_logging', 13 ] 14 15if CONFIG['MOZ_TSAN']: 16 gkrust_features += ['thread_sanitizer'] 17 18if CONFIG['MOZ_WEBRENDER_DEBUGGER']: 19 gkrust_features += ['webrender_debugger'] 20 21if CONFIG['MOZ_PULSEAUDIO']: 22 gkrust_features += ['cubeb_pulse_rust'] 23 24if CONFIG['MOZ_AUDIOUNIT_RUST']: 25 gkrust_features += ['cubeb_coreaudio_rust'] 26 27if CONFIG['MOZ_RUST_SIMD']: 28 gkrust_features += ['simd-accel'] 29 30# This feature is not yet supported on all platforms, and this check needs to 31# match MOZ_CUBEB_REMOTING in CubebUtils.cpp. 32if (CONFIG['OS_ARCH'] == 'Linux' and CONFIG['OS_TARGET'] != 'Android') or CONFIG['OS_ARCH'] == 'Darwin' or (CONFIG['OS_ARCH'] == 'WINNT' and CONFIG['CPU_ARCH'] != 'aarch64'): 33 gkrust_features += ['cubeb-remoting'] 34 35if CONFIG['MOZ_MEMORY']: 36 gkrust_features += ['moz_memory'] 37 38if CONFIG['MOZ_PLACES']: 39 gkrust_features += ['moz_places'] 40 41if CONFIG['ENABLE_WASM_CRANELIFT']: 42 gkrust_features += ['spidermonkey_rust'] 43 if CONFIG['JS_CODEGEN_X86'] or CONFIG['JS_CODEGEN_X64']: 44 gkrust_features += ['cranelift_x86'] 45 elif CONFIG['JS_CODEGEN_ARM']: 46 gkrust_features += ['cranelift_arm32'] 47 elif CONFIG['JS_CODEGEN_ARM64']: 48 gkrust_features += ['cranelift_arm64'] 49 else: 50 gkrust_features += ['cranelift_none'] 51 52if CONFIG['JS_ENABLE_SMOOSH']: 53 gkrust_features += ['smoosh'] 54 55if CONFIG['MOZ_GECKO_PROFILER']: 56 gkrust_features += ['gecko_profiler'] 57 58if CONFIG['MOZ_GECKO_PROFILER_PARSE_ELF']: 59 gkrust_features += ['gecko_profiler_parse_elf'] 60 61if CONFIG['MOZ_BITS_DOWNLOAD']: 62 gkrust_features += ['bitsdownload'] 63 64if CONFIG['MOZ_NEW_XULSTORE']: 65 gkrust_features += ['new_xulstore'] 66 67if CONFIG['LIBFUZZER']: 68 gkrust_features += ['libfuzzer'] 69 70if CONFIG['MOZ_WEBRTC']: 71 gkrust_features += ['webrtc'] 72 73# We need to tell Glean it is being built with Gecko. 74gkrust_features += ['glean_with_gecko'] 75 76if not CONFIG['MOZILLA_OFFICIAL']: 77 gkrust_features += ['glean_disable_upload'] 78 79if CONFIG['MOZ_ENABLE_DBUS']: 80 gkrust_features += ['with_dbus'] 81 82if CONFIG["MOZ_CRASHREPORTER"] and CONFIG['MOZ_OXIDIZED_BREAKPAD']: 83 gkrust_features += ['oxidized_breakpad'] 84 85if CONFIG["MOZ_WEBMIDI_MIDIR_IMPL"]: 86 gkrust_features += ['webmidi_midir_impl'] 87