Skip to content

Respect rustflags settings in cargo configuration file#1405

Merged
bors[bot] merged 2 commits intoPyO3:mainfrom
messense:cargo-config-rustflags
Jan 11, 2023
Merged

Respect rustflags settings in cargo configuration file#1405
bors[bot] merged 2 commits intoPyO3:mainfrom
messense:cargo-config-rustflags

Conversation

@messense
Copy link
Member

@messense messense commented Jan 9, 2023

https://github.com/taiki-e/cargo-config2

CARGO_ENCODED_RUSTFLAGS requires Rust 1.55+ so technically it's a breaking change even though our MSRV is 1.62 we can actually build packages with older versions of Rust.

@netlify
Copy link

netlify bot commented Jan 9, 2023

Deploy Preview for maturin-guide ready!

Name Link
🔨 Latest commit bc631f1
🔍 Latest deploy log https://app.netlify.com/sites/maturin-guide/deploys/63be26c59d08a900086ec781
😎 Deploy Preview https://deploy-preview-1405--maturin-guide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@messense messense force-pushed the cargo-config-rustflags branch from 0e1801c to 1409676 Compare January 9, 2023 14:55
@messense messense marked this pull request as draft January 9, 2023 15:40
@messense
Copy link
Member Author

bors try

bors bot added a commit that referenced this pull request Jan 10, 2023
@bors
Copy link
Contributor

bors bot commented Jan 10, 2023

@messense messense marked this pull request as ready for review January 10, 2023 07:18
@messense messense added the breaking-change Breaking change label Jan 10, 2023
@messense messense added this to the 1.0.0 milestone Jan 10, 2023
@messense messense force-pushed the cargo-config-rustflags branch from b6aad5b to 4217019 Compare January 10, 2023 07:21
@messense
Copy link
Member Author

bors r+

bors bot added a commit that referenced this pull request Jan 11, 2023
1405: Respect `rustflags` settings in cargo configuration file r=messense a=messense

https://github.com/taiki-e/cargo-config2

`CARGO_ENCODED_RUSTFLAGS` requires Rust 1.55+ so technically it's a breaking change even though our MSRV is 1.62 we can actually build packages with older versions of Rust.

Co-authored-by: messense <messense@icloud.com>
@messense messense force-pushed the cargo-config-rustflags branch from 4217019 to 4a5ad5b Compare January 11, 2023 03:01
@bors
Copy link
Contributor

bors bot commented Jan 11, 2023

Canceled.

@messense messense force-pushed the cargo-config-rustflags branch from 4a5ad5b to 7871f68 Compare January 11, 2023 03:01
https://doc.rust-lang.org/cargo/reference/config.html#buildrustflags

There are four mutually exclusive sources of extra flags. They are checked in order, with the first one being used:

1. `CARGO_ENCODED_RUSTFLAGS` environment variable.
2. `RUSTFLAGS` environment variable.
3. All matching `target.<triple>.rustflags` and `target.<cfg>.rustflags` config entries joined together.
4. `build.rustflags` config value.

This requires Rust 1.55+, our MSRV is 1.62 ATM so it's fine.
@messense messense force-pushed the cargo-config-rustflags branch from 7871f68 to bc631f1 Compare January 11, 2023 03:02
@messense
Copy link
Member Author

bors retry

@bors
Copy link
Contributor

bors bot commented Jan 11, 2023

@bors bors bot merged commit cd02ecf into PyO3:main Jan 11, 2023
@messense messense deleted the cargo-config-rustflags branch January 11, 2023 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant