Skip to content

Rollup of 9 pull requests #98752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Jul 1, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
1d845bd
fix `emit_inference_failure_err` ICE
lcnr Jun 28, 2022
c6f362a
Let rust-analyzer ship on stable, non-preview
cuviper Jun 28, 2022
ddb6313
add ice test for 46511
matthiaskrgr Jun 29, 2022
debee1e
Update RELEASES.md
tmiasko Jun 30, 2022
8931fbd
add logging to `write_resolution`
lcnr Jun 30, 2022
e043821
add issue number to fixme
lcnr Jun 30, 2022
c29e584
Flip RustAnalyzer to stable=true
cuviper Jun 30, 2022
cd7bd8b
rustdoc: filter '_ lifetimes from ty::PolyTraitRef
notriddle Jun 30, 2022
3fcf84a
clarify that ExactSizeIterator::len returns the remaining length
the8472 Jun 30, 2022
d791310
Request to be notified of MIR changes
celinval Jun 30, 2022
79f8dc0
Add a `--build-dir` flag to rustbuild
thomcc Jun 30, 2022
4ea18cc
Add macro_rules! rustdoc change to 1.62 relnotes
CAD97 Jul 1, 2022
0d5636c
Rollup merge of #98610 - lcnr:emit_inference_failure_err-ice, r=estebank
matthiaskrgr Jul 1, 2022
41e7991
Rollup merge of #98640 - cuviper:stable-rust-analyzer, r=Mark-Simulacrum
matthiaskrgr Jul 1, 2022
0420231
Rollup merge of #98686 - matthiaskrgr:test-46511, r=compiler-errors
matthiaskrgr Jul 1, 2022
e59693a
Rollup merge of #98727 - notriddle:notriddle/issue-98697, r=Guillaume…
matthiaskrgr Jul 1, 2022
734f21c
Rollup merge of #98729 - the8472:exactsize-docs, r=thomcc
matthiaskrgr Jul 1, 2022
80dd48b
Rollup merge of #98733 - celinval:patch-1, r=Mark-Simulacrum
matthiaskrgr Jul 1, 2022
c4acd06
Rollup merge of #98734 - tmiasko:uninhabited-calls-release-notes, r=M…
matthiaskrgr Jul 1, 2022
335e7d3
Rollup merge of #98745 - thomcc:build-dir-arg, r=jyn514
matthiaskrgr Jul 1, 2022
18d4228
Rollup merge of #98749 - CAD97:patch-3, r=jyn514
matthiaskrgr Jul 1, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add a --build-dir flag to rustbuild
  • Loading branch information
thomcc committed Jun 30, 2022
commit 79f8dc0b898b0a387df684a539cd97446a0f964f
3 changes: 2 additions & 1 deletion src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,7 @@ def bootstrap(help_triggered):

parser = argparse.ArgumentParser(description='Build rust')
parser.add_argument('--config')
parser.add_argument('--build-dir')
parser.add_argument('--build')
parser.add_argument('--color', choices=['always', 'never', 'auto'])
parser.add_argument('--clean', action='store_true')
Expand Down Expand Up @@ -915,7 +916,7 @@ def bootstrap(help_triggered):

build.check_vendored_status()

build_dir = build.get_toml('build-dir', 'build') or 'build'
build_dir = args.build_dir or build.get_toml('build-dir', 'build') or 'build'
build.build_dir = os.path.abspath(build_dir)

with open(os.path.join(build.rust_root, "src", "stage0.json")) as f:
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ impl Config {
let build = toml.build.unwrap_or_default();

set(&mut config.initial_rustc, build.rustc.map(PathBuf::from));
set(&mut config.out, build.build_dir.map(PathBuf::from));
set(&mut config.out, flags.build_dir.or_else(|| build.build_dir.map(PathBuf::from)));
// NOTE: Bootstrap spawns various commands with different working directories.
// To avoid writing to random places on the file system, `config.out` needs to be an absolute path.
if !config.out.is_absolute() {
Expand Down
8 changes: 8 additions & 0 deletions src/bootstrap/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ pub struct Flags {
pub host: Option<Vec<TargetSelection>>,
pub target: Option<Vec<TargetSelection>>,
pub config: Option<PathBuf>,
pub build_dir: Option<PathBuf>,
pub jobs: Option<u32>,
pub cmd: Subcommand,
pub incremental: bool,
Expand Down Expand Up @@ -174,6 +175,12 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`",
opts.optflagmulti("v", "verbose", "use verbose output (-vv for very verbose)");
opts.optflag("i", "incremental", "use incremental compilation");
opts.optopt("", "config", "TOML configuration file for build", "FILE");
opts.optopt(
"",
"build-dir",
"Build directory, overrides `build.build-dir` in `config.toml`",
"DIR",
);
opts.optopt("", "build", "build target of the stage0 compiler", "BUILD");
opts.optmulti("", "host", "host targets to build", "HOST");
opts.optmulti("", "target", "target targets to build", "TARGET");
Expand Down Expand Up @@ -649,6 +656,7 @@ Arguments:
None
},
config: matches.opt_str("config").map(PathBuf::from),
build_dir: matches.opt_str("build-dir").map(PathBuf::from),
jobs: matches.opt_str("jobs").map(|j| j.parse().expect("`jobs` should be a number")),
cmd,
incremental: matches.opt_present("incremental"),
Expand Down