mirror of
https://github.com/servo/servo.git
synced 2025-07-24 07:40:27 +01:00
script: Feature-gate all crown support. (#35055)
* script: Feature-gate all crown support. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Use cfg(crown) instead of a cargo feature. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
1bd34a5781
commit
875e387004
223 changed files with 442 additions and 417 deletions
|
@ -797,6 +797,8 @@ class CommandBase(object):
|
|||
if command == 'rustc':
|
||||
args += ["--lib", "--crate-type=cdylib"]
|
||||
|
||||
features = []
|
||||
|
||||
if use_crown:
|
||||
if 'CARGO_BUILD_RUSTC' in env:
|
||||
current_rustc = env['CARGO_BUILD_RUSTC']
|
||||
|
@ -805,6 +807,7 @@ class CommandBase(object):
|
|||
f'already set to `{current_rustc}` in the parent environment.\n'
|
||||
'These options conflict, please specify only one of them.')
|
||||
sys.exit(1)
|
||||
features += ["crown"]
|
||||
env['CARGO_BUILD_RUSTC'] = 'crown'
|
||||
# Changing `RUSTC` or `CARGO_BUILD_RUSTC` does not cause `cargo check` to
|
||||
# recheck files with the new compiler. `cargo build` is not affected and
|
||||
|
@ -814,7 +817,7 @@ class CommandBase(object):
|
|||
env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + " --cfg=crown"
|
||||
|
||||
if "-p" not in cargo_args: # We're building specific package, that may not have features
|
||||
features = list(self.features)
|
||||
features += list(self.features)
|
||||
if self.enable_media:
|
||||
features.append("media-gstreamer")
|
||||
if self.config["build"]["debug-mozjs"] or debug_mozjs:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue