toolkit/library/rust/gkrust-features.mozbuild
author Matthew Gregan <kinetik@flim.org>
Thu, 07 Mar 2019 02:05:18 +0000
changeset 520690 ea127c95a4b9abdff54c49562c253d661622b663
parent 520589 873b90887e3af682383dea7a7e1fb52d6ec02960
child 521154 ed3b55f9d32607b2f60156551c627a5b88930373
permissions -rw-r--r--
Bug 1512445 - Enable AudioIPC build on Windows (default off via pref). r=chunmin Differential Revision: https://phabricator.services.mozilla.com/D22155

# -*- 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 = ['servo', 'bindgen']

if CONFIG['MOZ_DEBUG']:
    gkrust_features += ['gecko_debug']

if CONFIG['MOZ_BUILD_WEBRENDER']:
    gkrust_features += ['quantum_render']

if CONFIG['MOZ_PULSEAUDIO']:
    gkrust_features += ['cubeb_pulse_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['ENABLE_WASM_CRANELIFT']:
    gkrust_features += ['spidermonkey_rust']

if CONFIG['MOZ_GECKO_PROFILER']:
    gkrust_features += ['gecko_profiler']

if CONFIG['MOZ_GECKO_PROFILER_PARSE_ELF']:
    gkrust_features += ['gecko_profiler_parse_elf']