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

Modify build_system's prepare stage to allow for custom sysroot source path #494

Merged
merged 1 commit into from
Apr 24, 2024
Merged

Modify build_system's prepare stage to allow for custom sysroot source path #494

merged 1 commit into from
Apr 24, 2024

Conversation

darcagn
Copy link
Contributor

@darcagn darcagn commented Apr 17, 2024

This change allows users to specify a custom directory from which to copy the sysroot source code instead of being forced to use the rust-src provided with the rustup toolchain. The path is passed to --sysroot-source during the prepare stage, like so:

./y.sh prepare --sysroot-source /path/to/custom/source

This removes a pain point for using rustc_codegen_gcc while creating and testing support for new platforms with architectures without LLVM support.

@GuillaumeGomez
Copy link
Member

I wonder if it shouldn't a setting (in config.toml) instead. It's easy to forget to pass an argument after all... An opinion maybe @antoyo?

@darcagn
Copy link
Contributor Author

darcagn commented Apr 23, 2024

That's definitely a reasonable approach -- let me know what you think @antoyo and I'll be happy to adjust my PR to implement this functionality in that way.

Copy link
Contributor

@antoyo antoyo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small thing to fix.

build_system/src/prepare.rs Outdated Show resolved Hide resolved
@antoyo
Copy link
Contributor

antoyo commented Apr 23, 2024

@darcagn: I would say: choose the approach that is the most convenient to you since you're the main user of this new flag.

@antoyo antoyo merged commit 01b0fb7 into rust-lang:master Apr 24, 2024
34 checks passed
@antoyo
Copy link
Contributor

antoyo commented Apr 24, 2024

Thanks for your contribution!

@darcagn darcagn deleted the custom_rustlib branch May 5, 2024 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants