зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1499196 - Always use the topobjdir to output rust library dependencies. r=ted,firefox-build-system-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D9039
This commit is contained in:
Родитель
b51590cb83
Коммит
9c0704f0de
|
@ -62,7 +62,7 @@ def DisableCompilerWarnings():
|
|||
COMPILE_FLAGS['WARNINGS_CFLAGS'] = []
|
||||
|
||||
@template
|
||||
def RustLibrary(name, features=None, target_dir=None, output_category=None):
|
||||
def RustLibrary(name, features=None, output_category=None):
|
||||
'''Template for Rust libraries.'''
|
||||
Library(name)
|
||||
|
||||
|
@ -78,9 +78,6 @@ def RustLibrary(name, features=None, target_dir=None, output_category=None):
|
|||
if features:
|
||||
RUST_LIBRARY_FEATURES = features
|
||||
|
||||
if target_dir:
|
||||
RUST_LIBRARY_TARGET_DIR = target_dir
|
||||
|
||||
if output_category:
|
||||
RUST_LIBRARY_OUTPUT_CATEGORY = output_category
|
||||
|
||||
|
|
|
@ -529,7 +529,7 @@ class TreeMetadataEmitter(LoggingMixin):
|
|||
'crate-type %s is not permitted for %s' % (crate_type, libname),
|
||||
context)
|
||||
|
||||
cargo_target_dir = context.get('RUST_LIBRARY_TARGET_DIR', '.')
|
||||
cargo_target_dir = context.config.topobjdir
|
||||
|
||||
dependencies = set(config.get('dependencies', {}).iterkeys())
|
||||
|
||||
|
|
|
@ -837,7 +837,7 @@ class TestRecursiveMakeBackend(BackendTester):
|
|||
if not l.startswith('COMPUTED_')]
|
||||
|
||||
expected = [
|
||||
'RUST_LIBRARY_FILE := ./x86_64-unknown-linux-gnu/release/libtest_library.a',
|
||||
'RUST_LIBRARY_FILE := %s/x86_64-unknown-linux-gnu/release/libtest_library.a' % env.topobjdir,
|
||||
'CARGO_FILE := $(srcdir)/Cargo.toml',
|
||||
'CARGO_TARGET_DIR := %s' % env.topobjdir,
|
||||
]
|
||||
|
@ -854,7 +854,7 @@ class TestRecursiveMakeBackend(BackendTester):
|
|||
if not l.startswith('COMPUTED_')]
|
||||
|
||||
expected = [
|
||||
'HOST_RUST_LIBRARY_FILE := ./x86_64-unknown-linux-gnu/release/libhostrusttool.a',
|
||||
'HOST_RUST_LIBRARY_FILE := %s/x86_64-unknown-linux-gnu/release/libhostrusttool.a' % env.topobjdir,
|
||||
'CARGO_FILE := $(srcdir)/Cargo.toml',
|
||||
'CARGO_TARGET_DIR := %s' % env.topobjdir,
|
||||
]
|
||||
|
@ -871,7 +871,7 @@ class TestRecursiveMakeBackend(BackendTester):
|
|||
if not l.startswith('COMPUTED_')]
|
||||
|
||||
expected = [
|
||||
'HOST_RUST_LIBRARY_FILE := ./x86_64-unknown-linux-gnu/release/libhostrusttool.a',
|
||||
'HOST_RUST_LIBRARY_FILE := %s/x86_64-unknown-linux-gnu/release/libhostrusttool.a' % env.topobjdir,
|
||||
'CARGO_FILE := $(srcdir)/Cargo.toml',
|
||||
'CARGO_TARGET_DIR := %s' % env.topobjdir,
|
||||
'HOST_RUST_LIBRARY_FEATURES := musthave cantlivewithout',
|
||||
|
@ -889,7 +889,7 @@ class TestRecursiveMakeBackend(BackendTester):
|
|||
if not l.startswith('COMPUTED_')]
|
||||
|
||||
expected = [
|
||||
'RUST_LIBRARY_FILE := ./x86_64-unknown-linux-gnu/release/libfeature_library.a',
|
||||
'RUST_LIBRARY_FILE := %s/x86_64-unknown-linux-gnu/release/libfeature_library.a' % env.topobjdir,
|
||||
'CARGO_FILE := $(srcdir)/Cargo.toml',
|
||||
'CARGO_TARGET_DIR := %s' % env.topobjdir,
|
||||
'RUST_LIBRARY_FEATURES := musthave cantlivewithout',
|
||||
|
|
|
@ -6,5 +6,5 @@
|
|||
|
||||
include('../../rust/gkrust-features.mozbuild')
|
||||
|
||||
RustLibrary('gkrust-gtest', gkrust_features, '../..',
|
||||
RustLibrary('gkrust-gtest', gkrust_features,
|
||||
output_category=None if CONFIG['LINK_GTEST_DURING_COMPILE'] else 'gtest')
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
include('gkrust-features.mozbuild')
|
||||
|
||||
RustLibrary('gkrust', gkrust_features, '..')
|
||||
RustLibrary('gkrust', gkrust_features)
|
||||
|
||||
# Target directory doesn't matter a lot here, since we can't share panic=abort
|
||||
# compilation artifacts with gkrust.
|
||||
|
|
Загрузка…
Ссылка в новой задаче