-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
the .cargo/config.toml rustflags did not passed to the compiler #12794
Comments
Could you run Also, there are a list of precedence of how Cargo picks rustflags config. Please see the order and check if your |
I have checked, there is no |
Thanks for the reply. I can reproduce it with provided repo and found there is Could you check if I would also suggest using
Could you point them out? At this moment with limited info, I cannot see any issue related to this one, except #12087 which talks about bad discovery of rustflags override chain. |
wired. I am check the
there is no path
from the config it look like the config make effect but I could not build the project using cargo build, thow the error:
|
sorry my mistake, it seems the env RUSTFLAGS config override the rustflags. I found the config:
|
When I migrate the rustflags from command line to config files, the rustflags did not passed to the compiler. I am compile the project with FFI using command like this:
RUSTFLAGS='-L ./src/so' cargo build
it works fine. but when I changed to the config file:
could not compile the project.
I tried this code:
I expected to see this happen:
both using command and config could compile the project success.
Instead, this happened:
command line works, config file failed.
Meta
rustc --version --verbose
:the minimal reproduce example:
git clone -b rustflags https://github.com/jiangxiaoqiang/rust-learn.git
there is the similiar issue told that maybe rustc issue: #4452
The text was updated successfully, but these errors were encountered: