diff options
author | Samson <16504129+sagudev@users.noreply.github.com> | 2025-01-31 19:08:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-31 18:08:04 +0000 |
commit | 724f701f79a57ad83797391b28e04dea6b8318cd (patch) | |
tree | 75d85e36db4da2988fd0a1f6f40594419010145c /python/servo | |
parent | 22867c50463f1776477cee710ad16608c97d30ea (diff) | |
download | servo-724f701f79a57ad83797391b28e04dea6b8318cd.tar.gz servo-724f701f79a57ad83797391b28e04dea6b8318cd.zip |
crown: Pass `--cfg crown` to rustc from crown (#35073)
* crown: Pass `--cfg crown` to rustc from crown
also includes minor fix in crown for wrapper running based on clippy code
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* fix doc
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Update python/servo/command_base.py
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com>
---------
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Diffstat (limited to 'python/servo')
-rw-r--r-- | python/servo/command_base.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py index ca026f07758..799fbdca8ee 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -807,14 +807,12 @@ 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 - # triggers a rebuild as expected. To also make `check` work as expected, - # we add a dummy `cfg` to RUSTFLAGS when using crown, so as to have different - # RUSTFLAGS when using `crown`, to reliably trigger re-checking. - env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + " --cfg=crown" + # Modyfing `RUSTC` or `CARGO_BUILD_RUSTC` to use a linter does not cause + # `cargo check` to rebuild. To work around this bug use a `crown` feature + # to invalidate caches and force a rebuild / relint. + # See https://github.com/servo/servo/issues/35072#issuecomment-2600749483 + features += ["crown"] if "-p" not in cargo_args: # We're building specific package, that may not have features features += list(self.features) |