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

Fixes for -g handling #24945

Merged
merged 3 commits into from
Apr 30, 2015
Merged

Conversation

pnkfelix
Copy link
Member

Fixes for -g handling

First:

  • decouples our handling of -g for the test suite from our handling of -g for the rest of the compiler/stdlib building.
  • Namely, if you do --enable-debug or --enable-debuginfo, that should only affect rustc and the standard library crates; the tests should all continue to compile without -g unless:
    • you pass --enable-debuginfo-tests, or
    • the test itself requests the -g option (e.g. via a // compile-flags: -g embedded comment).

Second:

  • Makes rustc more flexible in that it now accepts multiple occurrences of -g -g
  • (as a drive-by, I gave -O the same treatment: multiple occurrences of -O are treated as synonymous as a single occurrence of -O.

Fix #24937

Then, decouple the question of whether the compiler/stdlib carry
debuginfo (which is controlled via `--enable-debuginfo` and implied by
`--enable-debug`) from the question of whether the tests carry
debuginfo (which now no longer is implied by `--enable-debug` nor
`--enable-debuginfo`, and is off by default).
@rust-highfive
Copy link
Collaborator

r? @huonw

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member

Could you add a test that explicitly passes itself -g -g -O -O just to make sure that continues to work? Other than that through r=me

@pnkfelix
Copy link
Member Author

@alexcrichton good idea, will do

@tamird
Copy link
Contributor

tamird commented Apr 29, 2015

Does it make sense to also follow up on #24932 (comment) in this PR?

@pnkfelix
Copy link
Member Author

@tamird I'll do that separately; I want to land this on its own rather than let them get tangled.

@pnkfelix
Copy link
Member Author

@bors r=alexcrichton df82df8 rollup

pnkfelix added a commit to pnkfelix/rust that referenced this pull request Apr 29, 2015
Note it is safe, with respect to autobuilds, to land before rust-lang#24945.

(In other words, landing this sooner won't break things for anyone any
worse than they were already broken, since there are *other* tests
that also add `-g` to their flags via `compile-flags: -g`.)
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Apr 29, 2015
Fixes for -g handling

First:
 * decouples our handling of `-g` for the test suite from our handling of `-g` for the rest of the compiler/stdlib building.
 * Namely, if you do `--enable-debug` or `--enable-debuginfo`, that should only affect `rustc` and the standard library crates; the tests should all continue to compile without `-g` unless:
   * you pass `--enable-debuginfo-tests`, or
   * the test itself requests the `-g` option (e.g. via a `// compile-flags: -g` embedded comment).

Second:
 * Makes `rustc` more flexible in that it now accepts multiple occurrences of `-g -g`
 * (as a drive-by, I gave `-O` the same treatment: multiple occurrences of `-O` are treated as synonymous as a single occurrence of `-O`.

Fix rust-lang#24937
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Apr 29, 2015
…24687-test

Add `-g` (to testcase) that I should have included in PR rust-lang#24932.

Note it is safe, with respect to autobuilds, to land before rust-lang#24945.

(In other words, landing this sooner won't break things for anyone any
worse than they were already broken, since there are *other* tests
that also add `-g` to their flags via `compile-flags: -g`.)
@bors bors merged commit df82df8 into rust-lang:master Apr 30, 2015
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.

rustc fails if passed -g -g; make check breaks under --enable-debug.
6 participants