Support passing arbitrary extra flags to rustc#566
Support passing arbitrary extra flags to rustc#566UebelAndre merged 27 commits intobazelbuild:mainfrom
Conversation
d167ffd to
27e8333
Compare
5e48949 to
531310f
Compare
hlopko
left a comment
There was a problem hiding this comment.
Thanks for working on this, this is a very useful PR!!
|
Howdy, any updates here? This seems like an awesome feature 😄 |
|
Friendly ping, I'm happy to take over if you're too busy, just let me know. |
|
This is updated on latest HEAD and tests are passing. |
|
Added some docs, wasn't completely sure where to put them so I added them to the |
UebelAndre
left a comment
There was a problem hiding this comment.
Small nit but otherwise looks good to me! 😄 Thanks for reviving this PR!!
|
Could we land this? :) |
I'll resolve the conflicts. I think there was some bikeshedding over the flag name. I don't have a strong opinion. |
|
I retested LTO and it turns out that it's no longer broken with proc-macros (probably something I did with toolchain resolution in my repo lately if I had to guess). In any case, excluding these flags from the exec configuration still seems like the right thing to do to me. I've changed to detecting this based off of the |
|
I asked about the host/exec detection in bazelbuild/bazel#13308 (comment), let's see what they say. Could you add a unittest showing that a flag does appear on the command line for a target in target configuration, and that it doesn't appear for a target in exec configuration? Should be fairly simple given https://github.com/bazelbuild/bazel-skylib/blob/main/lib/unittest.bzl#L188. Thank you so much! |
|
Ok, it seems the genfiles_dir path is the only way to detect exec configuration. From me this PR looks good, modulo the unit test (if you don't have capacity to add the test please let us know, maybe somebody will be able to help out). |
dcac704 to
98d7be5
Compare
|
@hlopko merged latest main and added tests |
|
Is the PR description up to date? How do we set flags? |
|
Updated the PR description
…On Tue, Aug 31, 2021 at 7:09 AM UebelAndre ***@***.***> wrote:
Is the PR description up to date? How do we set flags?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#566 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA5AFYS4DCSWSNPH4MZ5LTT7TPDFANCNFSM4W347MFQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
UebelAndre
left a comment
There was a problem hiding this comment.
It seems some stuff got removed from docs. If you fix this I can merge give that @hlopko gave a thumbs up pending a test
| _rust_bindgen_repositories = "rust_bindgen_repositories", | ||
| ) | ||
| load( | ||
| "@rules_rust//cargo:defs.bzl", |
There was a problem hiding this comment.
This seems like a bad merge conflict resolution. Can you restore this and the other deleted things in this file?
There was a problem hiding this comment.
Redid the merge, looks better now, I think. Please take another look.
e00b954 to
2586e2d
Compare
10e7d73 to
9457966
Compare
Adds a bazel command line flag for passing arbitrary extra arguments to all (non-exec configuration) rustc invocations. This is necessary beyond using
rustc_flagsif you want to enable something that needs to be enabled globally, such aslto=thin.Usage: