Skip to content

A way to out-put building self-contained deps #147065

@weihanglo

Description

@weihanglo

Summary

Posted by @denizsokmen #141375 (comment):

Custom target issue is actually more related to Rust bootstrap forcefully cross-compiling crtbegin, crtend and llvm-libunwind for musl for self-contained linkage reasons:

let libunwind_path = copy_llvm_libunwind(builder, target, &libdir_self_contained);
and https://github.com/rust-lang/rust/blob/master/src/bootstrap/src/core/config/target_selection.rs#L96

I see no way to opt out of that, even though those binaries won't be used as they'll be fetched from the sysroot of that musl-based custom target. Is there a way to tell Rust bootstrap not to bother with preparing self-contained binaries?

Expected behaviour

A way to out-put crtbegin, crtend and llvm-libunwind build for custom musl target.

Actual behaviour

You'll need to patch code as described: #141375 (comment).

Possible solution

Probalby extend the target table in bootstrap.toml like target.self-contained = <bool>?

Bootstrap configuration (bootstrap.toml)

[target.my-custom-musl]
linker = ""
musl-root = ""
cc = ""
cxx = ""
cflags = ""
cxxflags = ""
rustflags= ""
llvm-libunwind = "system"

HEAD

5b9007b

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions