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

Augment, rather than replace, existing RUSTFLAGS when building #103

Merged
merged 1 commit into from
Feb 10, 2021

Conversation

ahesford
Copy link
Contributor

@ahesford ahesford commented Feb 8, 2021

Some complex environments may use RUSTFLAGS to control the behavior of rust compilation. Rather than overwriting RUSTFLAGS with custom flags, augment any existing RUSTFLAGS to preserve these environments.

This is used, for example, by Void Linux to set --sysroot=${XBPS_CROSS_BASE}/usr in cross-compilation environments to point to the target system root.

Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

Thanks for this fix! Mind adding a CHANGELOG entry? Then I'll merge and release this and the other fixes waiting to go out.

Some complex environments (like cross-compilation environments) may use
RUSTFLAGS to control the behavior of rust compilation. Rather than
overwriting RUSTFLAGS with compilation options determined in
build.build_rust.build_extension, the extension-specific flags are now
appended to any existing RUSTFLAGS to preserve the build environment.
@ahesford
Copy link
Contributor Author

ahesford commented Feb 9, 2021

I appreciate your quick response. The latest version includes a changelog entry and a slightly more descriptive commit message.

@davidhewitt
Copy link
Member

Great, thanks again!

@davidhewitt davidhewitt merged commit eac6ce1 into PyO3:master Feb 10, 2021
@ahesford ahesford deleted the rustflags branch July 16, 2022 02:02
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