diff options
author | Josh Matthews <josh@joshmatthews.net> | 2025-01-18 16:36:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-18 21:36:15 +0000 |
commit | 875e3870049d2523ec349724d692a11665562d40 (patch) | |
tree | 22f6c6bc078bdb1f44567d4bc99d9b0450986309 /python/servo | |
parent | 1bd34a578117fdefb8ec20e5cbe49b38dd466c5b (diff) | |
download | servo-875e3870049d2523ec349724d692a11665562d40.tar.gz servo-875e3870049d2523ec349724d692a11665562d40.zip |
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>
Diffstat (limited to 'python/servo')
-rw-r--r-- | python/servo/command_base.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py index 59b36e8f688..ca026f07758 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -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: |