Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b20bc53
ci: fix explanation why LLVM download is disabled for windows-gnu
mati865 Nov 20, 2024
139d6ba
set rustc dylib on manually constructed rustc command
onur-ozkan Jan 30, 2025
4d42046
CompileTest: Add Directives to Ignore `arm-unknown-*` Tests
veera-sivarajan Jan 31, 2025
56795fb
Add amdgpu target
Flakebi Jan 2, 2025
860476f
Update encode_utf16 to mention it is native endian
hkBst Jan 30, 2025
88260f4
bootstrap: only build `crt{begin,end}.o` when compiling to MUSL
japaric Jan 21, 2025
2c35bd0
`#[optimize(none)]` implies `#[inline(never)]`
clubby789 Jan 31, 2025
8e9422f
Make comma separated lists of anything easier to make for errors
estebank Jan 31, 2025
0751e90
Rework "long type names" printing logic
estebank Jan 31, 2025
24cdaa1
Rename `tcx.ensure()` to `tcx.ensure_ok()`
Zalathar Jan 30, 2025
9e4f10d
Rename `tcx.ensure_with_value()` to `tcx.ensure_done()`
Zalathar Jan 30, 2025
fef46f4
Rename `ensure_forwards_result_if_red` to `return_result_from_ensure_ok`
Zalathar Jan 30, 2025
3581512
Use an explicit type when discarding the result of `tcx.ensure_ok()`
Zalathar Jan 30, 2025
3ae0239
Mark the tcx-ensure wrapper types with `#[must_use]`
Zalathar Jan 30, 2025
0141138
Rollup merge of #133266 - mati865:windows-gnu-llvm-download, r=Kobzol
matthiaskrgr Feb 1, 2025
72c5602
Rollup merge of #134740 - Flakebi:amdgpu-target, r=workingjubilee
matthiaskrgr Feb 1, 2025
bbf7ff7
Rollup merge of #135836 - ferrocene:ja-gh135782-build-crt-only-for-mu…
matthiaskrgr Feb 1, 2025
94103d2
Rollup merge of #136279 - Zalathar:ensure-ok, r=oli-obk
matthiaskrgr Feb 1, 2025
e9520b7
Rollup merge of #136283 - hkBst:patch-31, r=workingjubilee
matthiaskrgr Feb 1, 2025
7d480ea
Rollup merge of #136309 - onur-ozkan:133629, r=jieyouxu
matthiaskrgr Feb 1, 2025
32cef67
Rollup merge of #136328 - estebank:long-ty-path, r=jieyouxu,lqd
matthiaskrgr Feb 1, 2025
5388d87
Rollup merge of #136339 - veera-sivarajan:ignore-arm-unknown-headers,…
matthiaskrgr Feb 1, 2025
6bbbc75
Rollup merge of #136358 - clubby789:opt-none-noinline, r=saethlin
matthiaskrgr Feb 1, 2025
4990158
Rollup merge of #136368 - estebank:listify, r=fee1-dead
matthiaskrgr Feb 1, 2025
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
bootstrap: only build crt{begin,end}.o when compiling to MUSL
only MUSL needs those objects and trying to compile them to other
targets, e.g. Windows or macOS, will produce C compilation errors

check the target before shelling out to the C compiler and tweak
`make_run` to skip the actual C compilation when the target is not MUSL

fixes #135782
  • Loading branch information
japaric committed Jan 31, 2025
commit 88260f4ba4b0b9f86094bd1b2495c027bf959dbe
2 changes: 1 addition & 1 deletion src/bootstrap/src/core/build_steps/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ fn copy_self_contained_objects(
// to using gcc from a glibc-targeting toolchain for linking.
// To do that we have to distribute musl startup objects as a part of Rust toolchain
// and link with them manually in the self-contained mode.
if target.contains("musl") && !target.contains("unikraft") {
if target.needs_crt_begin_end() {
let srcdir = builder.musl_libdir(target).unwrap_or_else(|| {
panic!("Target {:?} does not have a \"musl-libdir\" key", target.triple)
});
Expand Down
4 changes: 3 additions & 1 deletion src/bootstrap/src/core/build_steps/llvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,9 @@ impl Step for CrtBeginEnd {
}

fn make_run(run: RunConfig<'_>) {
run.builder.ensure(CrtBeginEnd { target: run.target });
if run.target.needs_crt_begin_end() {
run.builder.ensure(CrtBeginEnd { target: run.target });
}
}

/// Build crtbegin.o/crtend.o for musl target.
Expand Down
4 changes: 4 additions & 0 deletions src/bootstrap/src/core/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,10 @@ impl TargetSelection {
env::var("OSTYPE").is_ok_and(|v| v.to_lowercase().contains("cygwin"))
}

pub fn needs_crt_begin_end(&self) -> bool {
self.contains("musl") && !self.contains("unikraft")
}

/// Path to the file defining the custom target, if any.
pub fn filepath(&self) -> Option<&Path> {
self.file.as_ref().map(Path::new)
Expand Down
Loading