mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
crown: Add a cargo config.toml file (#31090)
This makes it more foolproof to install crown from inside the Servo directory, because the root Servo config.toml overrides the rustc to use crown (an obvious circular dependency).
This commit is contained in:
parent
97284ead14
commit
3c1ab65458
3 changed files with 3 additions and 10 deletions
4
.github/workflows/windows.yml
vendored
4
.github/workflows/windows.yml
vendored
|
@ -71,10 +71,6 @@ jobs:
|
|||
choco install wixtoolset
|
||||
echo "C:\\Program Files (x86)\\WiX Toolset v3.11\\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
- name: Bootstrap
|
||||
env:
|
||||
# We need to override the rustc set in cargo/config.toml, because at
|
||||
# this point crown is not installed yet.
|
||||
RUSTC: "rustc"
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python mach fetch
|
||||
|
|
|
@ -96,13 +96,8 @@ class Base:
|
|||
return True
|
||||
|
||||
def install_crown(self, force: bool) -> bool:
|
||||
# We need to override the rustc set in cargo/config.toml because crown
|
||||
# may not be installed yet.
|
||||
env = dict(os.environ)
|
||||
env["CARGO_BUILD_RUSTC"] = "rustc"
|
||||
|
||||
print(" * Installing crown (the Servo linter)...")
|
||||
if subprocess.call(["cargo", "install", "--path", "support/crown"], env=env) != 0:
|
||||
if subprocess.call(["cargo", "install", "--path", "support/crown"]) != 0:
|
||||
raise EnvironmentError("Installation of crown failed.")
|
||||
|
||||
return True
|
||||
|
|
2
support/crown/.cargo/config.toml
Normal file
2
support/crown/.cargo/config.toml
Normal file
|
@ -0,0 +1,2 @@
|
|||
[build]
|
||||
rustc = "rustc"
|
Loading…
Add table
Add a link
Reference in a new issue