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

beta/stable regression with -g and -C debuginfo #40083

Closed
donhcd opened this issue Feb 24, 2017 · 8 comments
Closed

beta/stable regression with -g and -C debuginfo #40083

donhcd opened this issue Feb 24, 2017 · 8 comments
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta.

Comments

@donhcd
Copy link

donhcd commented Feb 24, 2017

with this .cargo/config:

[build]
rustflags = ["-g", "-C", "target-feature=+avx2,+fma"]

on beta and nightly, cargo build gives me:

 % cargo build
   Compiling winapi-build v0.1.1
   Compiling backtrace v0.2.3
   Compiling gcc v0.3.43
   Compiling semver v0.1.20
error: -g and -C debuginfo both provided
error: -g and -C debuginfo both provided


error: -g and -C debuginfo both provided
error: -g and -C debuginfo both provided


error: Could not compile `winapi-build`.
Build failed, waiting for other jobs to finish...
error: Could not compile `backtrace`.
Build failed, waiting for other jobs to finish...
error: Could not compile `gcc`.
Build failed, waiting for other jobs to finish...
error: build failed

On stable, compilation works fine:

   Compiling scoped-tls v0.1.0
   Compiling regex-syntax v0.3.9
   Compiling fnv v1.0.5
   Compiling lazy_static v0.1.16
   Compiling num-traits v0.1.36
   Compiling winapi-build v0.1.1
...etc

On nightly and beta, I can add

[profile.dev]
debug = false

to my Cargo.toml to eliminate the compile errors, but I don't need to do this on stable.

Meta

sh-3.2$ rustup run nightly rustc --version --verbose
rustc 1.17.0-nightly (413a975e3 2017-02-23)
binary: rustc
commit-hash: 413a975e31584d1e22d158a70c6d3073b991a618
commit-date: 2017-02-23
host: x86_64-apple-darwin
release: 1.17.0-nightly
LLVM version: 3.9
sh-3.2$ rustup run beta rustc --version --verbose
^Prustc 1.16.0-beta.2 (bc15d5281 2017-02-16)
binary: rustc
commit-hash: bc15d5281c07828e7e5ca31af2051347f62629f5
commit-date: 2017-02-16
host: x86_64-apple-darwin
release: 1.16.0-beta.2
LLVM version: 3.9
sh-3.2$ rustup run stable rustc --version --verbose
rustc 1.15.1 (021bd294c 2017-02-08)
binary: rustc
commit-hash: 021bd294c039bd54aa5c4aa85bcdffb0d24bc892
commit-date: 2017-02-08
host: x86_64-apple-darwin
release: 1.15.1
LLVM version: 3.9
@nagisa
Copy link
Member

nagisa commented Feb 25, 2017

This is not a rust-lang/rust regression. rustc did not accept -g and -C debuginfo at the same time since the first stable version I think.

@sfackler
Copy link
Member

Due to rust-lang/cargo#3534, Cargo now uses -C debuginfo rather than -g when enabling debuginfo.

@alexcrichton alexcrichton added the regression-from-stable-to-beta Performance or correctness regression from stable to beta. label Feb 25, 2017
@alexcrichton
Copy link
Member

@donhcd does passing -C debuginfo=2 work for you locally?

@alexcrichton
Copy link
Member

(e.g. changing -g to -C debuginfo=2

@donhcd
Copy link
Author

donhcd commented Feb 28, 2017

@alexcrichton yes, it looks like compilation works fine if I make that switch in .cargo/config

@alexcrichton
Copy link
Member

Ok, excellent! We are likely to end up closing this (e.g. not reverting the initial change to Cargo), but we can be sure to document that -C debuginfo=... should be used or otherwise just allow composing these two flags.

@donhcd
Copy link
Author

donhcd commented Feb 28, 2017

okay, sounds good to me. thanks for looking into this!

@brson
Copy link
Contributor

brson commented Mar 1, 2017

Closing per discussion.

@brson brson closed this as completed Mar 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta.
Projects
None yet
Development

No branches or pull requests

5 participants