Skip to content
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

Rollup of 15 pull requests #122338

Merged
merged 50 commits into from
Mar 11, 2024
Merged
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
a03d19e
Allow targets to override default codegen backend
WaffleLapkin Feb 14, 2024
5441523
Refactor out a repeating pattern with `get_or_default_sysroot`
WaffleLapkin Feb 15, 2024
9a77ec9
Rename `-Zno_parallel_llvm` -> `-Zno_parallel_backend`
WaffleLapkin Feb 15, 2024
f368922
Allow codegen backends to opt-out of parallel codegen
WaffleLapkin Feb 15, 2024
8bb49e2
Propagate the resolved type of assoc const bindings via query feeding
fmease Dec 31, 2023
6d115f5
Refactor out another repeating pattern
WaffleLapkin Feb 18, 2024
b94498a
Use existing query feeding workarounds
oli-obk Feb 21, 2024
3908a93
std support for wasm32 panic=unwind
coolreader18 Feb 21, 2024
861c7e7
Fix llvm hang
coolreader18 Feb 22, 2024
658a0a2
Unconditionally pass -wasm-enable-eh
coolreader18 Feb 22, 2024
125b26a
Use Itanium ABI for thrown exceptions
coolreader18 Feb 22, 2024
c7fcf43
Don't codegen wasm.throw unless with -Zbuild-std
coolreader18 Feb 26, 2024
858d336
Slightly simplify feeding of assoc const eq bounds
fmease Feb 23, 2024
d9a2886
add comment and test: we do not do value-based reasoning for promotio…
RalfJung Feb 29, 2024
30fa6a8
Rename `DropTreeBuilder::add_entry` to `link_entry_point`
Zalathar Mar 6, 2024
3bd8df9
Assert that `link_entry_point` sees the expected dummy terminator
Zalathar Mar 6, 2024
fbdac30
Rename `DropTree::add_entry` to `add_entry_point`
Zalathar Mar 6, 2024
5ba70bd
Replace tuples in `DropTree` with named structs
Zalathar Mar 6, 2024
d673fd8
Remove the unused `field_remapping` field from `TypeLowering`
beetrees Mar 8, 2024
bf47df8
interpret: do not call machine read hooks during validation
RalfJung Mar 9, 2024
58f6aaa
Improve diagnostics for parenthesized type arguments
wutchzone Mar 7, 2024
3830510
Ignore tests w/ current/next revisions from compare-mode=next-solver
compiler-errors Mar 11, 2024
a7cd803
use ptradd for vtable indexing
erikdesjardins Mar 11, 2024
73fc170
Store backtrace for must_produce_diag
compiler-errors Mar 10, 2024
01e6b43
Mark some next-solver-behavior tests explicitly with revisions
compiler-errors Mar 11, 2024
aea60b0
unix_sigpipe: Replace `inherit` with `sig_dfl` in syntax tests
Enselic Feb 9, 2024
816dc96
bootstrap readme: fix, improve, update
tshepang Mar 11, 2024
ed252e9
LLVM_TOOLS: Include llvm-link as a llvm tool
Oct 26, 2023
222ce4f
LLVM Bitcode Linker: Added crate
Feb 6, 2024
af42d2a
NVPTX: Enable self-contained for the nvptx target
Dec 1, 2023
43f2055
LLVM Bitcode Linker: Add as a linker known to the compiler
Feb 6, 2024
6a50d05
Bootstrap: Add argument for building llvm bitcode linker
Feb 6, 2024
843dd28
NVPTX: Enable previously disabled tests
Mar 4, 2024
279465b
const-checking: add some corner case tests, and fix some nits
RalfJung Mar 2, 2024
fb802f2
promote-not: add test that distinguishes promotion from outer scope rule
RalfJung Mar 11, 2024
88d387b
Rollup merge of #116791 - WaffleLapkin:unparallel-backends, r=oli-obk
workingjubilee Mar 11, 2024
86af4d2
Rollup merge of #116793 - WaffleLapkin:target_rules_the_backend, r=cj…
workingjubilee Mar 11, 2024
e1ceadc
Rollup merge of #117458 - kjetilkjeka:embedded-linker, r=petrochenkov
workingjubilee Mar 11, 2024
a450339
Rollup merge of #119385 - fmease:assoc-const-eq-fixes-2, r=oli-obk,cj…
workingjubilee Mar 11, 2024
1279830
Rollup merge of #121438 - coolreader18:wasm32-panic-unwind, r=cuviper
workingjubilee Mar 11, 2024
9300fbb
Rollup merge of #121893 - RalfJung:const-interior-mut-tests, r=oli-obk
workingjubilee Mar 11, 2024
e3f9b2f
Rollup merge of #122080 - Zalathar:drop-tree, r=oli-obk
workingjubilee Mar 11, 2024
05ff86c
Rollup merge of #122152 - wutchzone:120892, r=fmease
workingjubilee Mar 11, 2024
afa0581
Rollup merge of #122166 - beetrees:remove-field-remapping, r=davidtwco
workingjubilee Mar 11, 2024
f6ca425
Rollup merge of #122249 - RalfJung:machine-read-hook, r=oli-obk
workingjubilee Mar 11, 2024
671fc18
Rollup merge of #122299 - compiler-errors:bt-for-must-diag, r=nnether…
workingjubilee Mar 11, 2024
a11e6c3
Rollup merge of #122318 - compiler-errors:next-solver-tests, r=lcnr
workingjubilee Mar 11, 2024
028e260
Rollup merge of #122320 - erikdesjardins:vtable, r=nikic
workingjubilee Mar 11, 2024
9aca5c0
Rollup merge of #122328 - Enselic:sig_dfl-not-inherit, r=davidtwco
workingjubilee Mar 11, 2024
7fa6fa4
Rollup merge of #122330 - tshepang:patch-1, r=clubby789
workingjubilee Mar 11, 2024
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
Refactor out another repeating pattern
  • Loading branch information
WaffleLapkin committed Feb 18, 2024
commit 6d115f5d9a05380b983dd53d747150c8afbd48d8
26 changes: 7 additions & 19 deletions compiler/rustc_interface/src/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ pub fn run_compiler<R: Send>(config: Config, f: impl FnOnce(&Compiler) -> R + Se

let sysroot = filesearch::materialize_sysroot(config.opts.maybe_sysroot.clone());

let (codegen_backend, target_cfg) = match config.make_codegen_backend {
let (codegen_backend, target_override) = match config.make_codegen_backend {
None => {
// Build a target without override, so that it can override the backend if needed
let target =
Expand All @@ -365,36 +365,24 @@ pub fn run_compiler<R: Send>(config: Config, f: impl FnOnce(&Compiler) -> R + Se
);
}

// Re-build target with the (potential) override
let target = config::build_target_config(
&early_dcx,
&config.opts,
target_override,
&sysroot,
);

(backend, target)
(backend, target_override)
}
Some(make_codegen_backend) => {
// N.B. `make_codegen_backend` takes precedence over `target.default_codegen_backend`,
// which is ignored in this case.

let backend = make_codegen_backend(&config.opts);

// target_override is documented to be called before init(), so this is okay
let target_override = backend.target_override(&config.opts);

let target = config::build_target_config(
&early_dcx,
&config.opts,
target_override,
&sysroot,
);

(backend, target)
(backend, target_override)
}
};

// Re-build target with the (potential) override
let target_cfg =
config::build_target_config(&early_dcx, &config.opts, target_override, &sysroot);

let temps_dir = config.opts.unstable_opts.temps_dir.as_deref().map(PathBuf::from);

let bundle = match rustc_errors::fluent_bundle(
Expand Down
Loading