Skip to content

Move link-arg setting from .cargo/config.toml to build.rs #118

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 1 commit into from
Feb 20, 2023

Conversation

adamgreig
Copy link
Member

It's easy to forget about the hidden .cargo/config.toml file, and setting the linker flags in build.rs also means they can be changed without requiring a rebuild of everything, they are more robust to running the build from a location where .cargo/config.toml isn't picked up, and they make it easier to support different linker arguments for different crates or binaries.

Thanks to @Dirbaio for the suggestion!

Copy link
Member

@newAM newAM left a comment

Choose a reason for hiding this comment

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

I like this approach, it's more visible than a dotfile where the contents may be hidden in some environments.

@adamgreig adamgreig merged commit 6b2fd0e into master Feb 20, 2023
@adamgreig adamgreig deleted the link-arg branch February 20, 2023 22:56
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.

2 participants