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

build.rustflags is ignored #3261

Closed
jsgf opened this issue Nov 7, 2016 · 3 comments
Closed

build.rustflags is ignored #3261

jsgf opened this issue Nov 7, 2016 · 3 comments

Comments

@jsgf
Copy link
Contributor

jsgf commented Nov 7, 2016

According to http://doc.crates.io/config.html I should be able to use

[build]
rustflags = "..."

to set the linker and rustc flags, but they're ignored:

$ cargo build -v
warning: unused manifest key: build.rustflags
   Compiling t v0.1.0 (file:///Users/jsgf/t)
     Running `rustc src/main.rs --crate-name t --crate-type bin -g -C metadata=6e630606adc861f6 --out-dir /Users/jsgf/t/target/debug --emit=dep-info,link -L dependency=/Users/jsgf/t/target/debug/deps`
    Finished debug [unoptimized + debuginfo] target(s) in 0.41 secs
[package]
name = "t"
version = "0.1.0"

[build]
rustflags = "-Clinker=/bin/also/bad"
@jsgf
Copy link
Contributor Author

jsgf commented Nov 7, 2016

Invalid - config, not manifest

@jsgf jsgf closed this as completed Nov 7, 2016
@niondir
Copy link

niondir commented Aug 31, 2017

I have the same issue, any solutions for this?

@niondir
Copy link

niondir commented Aug 31, 2017

Okay got it. Moved the definitions into ./cargo/config

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

No branches or pull requests

2 participants