diff options
| author | bors <bors@rust-lang.org> | 2023-05-31 11:03:00 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-05-31 11:03:00 +0000 |
| commit | e4f7ad8e68206fa54372535b5c04d7ddbaea43be (patch) | |
| tree | 09e2bb4f0772768e9ef51752b3a9bd26c194fa20 /src/bootstrap | |
| parent | e29821ff85a2a3000d226f99f62f89464028d5d6 (diff) | |
| parent | 2054acb0a4a4ed9193ffccea1a5a2873649714d9 (diff) | |
Auto merge of #112132 - matthiaskrgr:rollup-x2l75gf, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - #111772 (Fix linkage for large binaries on mips64 platforms) - #111975 (Stop normalizing so many different prefixes) - #111979 (Respect CARGOFLAGS in bootstrap.py) - #112089 (Add `--warnings warn` flag to `x.py`) - #112103 (Bootstrap update to 1.71 beta) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/bootstrap.py | 21 | ||||
| -rw-r--r-- | src/bootstrap/test.rs | 4 |
2 files changed, 18 insertions, 7 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 58d1926ad96..473fdbe1edc 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -835,7 +835,7 @@ class RustBuild(object): """ return os.path.join(self.build_dir, "bootstrap", "debug", "bootstrap") - def build_bootstrap(self, color, verbose_count): + def build_bootstrap(self, color, warnings, verbose_count): """Build bootstrap""" env = os.environ.copy() if "GITHUB_ACTIONS" in env: @@ -877,6 +877,12 @@ class RustBuild(object): # preserve existing RUSTFLAGS env.setdefault("RUSTFLAGS", "") + # we need to explicitly add +xgot here so that we can successfully bootstrap + # a usable stage1 compiler + # FIXME: remove this if condition on the next bootstrap bump + # cfg(bootstrap) + if self.build_triple().startswith('mips'): + env["RUSTFLAGS"] += " -Ctarget-feature=+xgot" target_features = [] if self.get_toml("crt-static", build_section) == "true": target_features += ["+crt-static"] @@ -888,7 +894,11 @@ class RustBuild(object): if target_linker is not None: env["RUSTFLAGS"] += " -C linker=" + target_linker env["RUSTFLAGS"] += " -Wrust_2018_idioms -Wunused_lifetimes" - if self.get_toml("deny-warnings", "rust") != "false": + if warnings == "default": + deny_warnings = self.get_toml("deny-warnings", "rust") != "false" + else: + deny_warnings = warnings == "deny" + if deny_warnings: env["RUSTFLAGS"] += " -Dwarnings" env["PATH"] = os.path.join(self.bin_root(), "bin") + \ @@ -912,6 +922,10 @@ class RustBuild(object): args.append("--color=always") elif color == "never": args.append("--color=never") + try: + args += env["CARGOFLAGS"].split() + except KeyError: + pass # Run this from the source directory so cargo finds .cargo/config run(args, env=env, verbose=self.verbose, cwd=self.rust_root) @@ -977,6 +991,7 @@ def parse_args(): parser.add_argument('--color', choices=['always', 'never', 'auto']) parser.add_argument('--clean', action='store_true') parser.add_argument('--json-output', action='store_true') + parser.add_argument('--warnings', choices=['deny', 'warn', 'default'], default='default') parser.add_argument('-v', '--verbose', action='count', default=0) return parser.parse_known_args(sys.argv)[0] @@ -1042,7 +1057,7 @@ def bootstrap(args): # Fetch/build the bootstrap build.download_toolchain() sys.stdout.flush() - build.build_bootstrap(args.color, verbose_count) + build.build_bootstrap(args.color, args.warnings, verbose_count) sys.stdout.flush() # Run the bootstrap diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index 2924ba0bdf1..3290e6e0309 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -1704,10 +1704,6 @@ note: if you're sure you want to do this, please open an issue as to why. In the cmd.arg("--git-hash"); } - if let Some(commit) = builder.config.download_rustc_commit() { - cmd.env("FAKE_DOWNLOAD_RUSTC_PREFIX", format!("/rustc/{commit}")); - } - builder.ci_env.force_coloring_in_ci(&mut cmd); #[cfg(feature = "build-metrics")] |
