-
Notifications
You must be signed in to change notification settings - Fork 557
build: Inherit flags from rustc #1279
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
Conversation
|
It's not fully ready yet, so far I'm looking for some feedback. |
NobodyXu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I have some feedback with the code style/lint:
It's because in https://docs.rs/cc/latest/src/cc/lib.rs.html#660 Because the rust flag is turned on by default, it causes infinite looping. To fix this, you could use |
Ah interesting, I can't push to I'm calling |
Yes in that case you can call |
|
Hmm so I'm calling the new function like this: and then inside the function even doing just this makes it infinite loop on creating the Tool for Looking at the code I do not really understand why is_flag_supported_inner doesn't infinite loop on the first snippet already, can you explain what's different about these two calls? Sorry, not very familiar with the codebase.. |
Sorry, can you clarify on what function is |
Yep, I'm calling |
|
Sorri I made a mistake
So calling it there would trigger infinite loop. To fix that, you need to disable inherited flags detection in it: |
|
Ah indeed you're right, now it makes sense - many thanks! :) |
306b961 to
a9098fa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for starting on this 🎉!
e76efbc to
fc181eb
Compare
madsmtm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks a lot better to me, thanks for doing the work! Only nits from my side now.
fc181eb to
1a8e8de
Compare
|
Should be good now I think :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
I am happy about the direction and general code, just a few questions regarding panic, ergonomic and some simple optimization
|
There's a merge conflict, I'd fine with either a merge or rebase, whatever is convenient to you. |
791ee45 to
fff1a82
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
This is the last review pass from me, and it mostly contains code suggestions that can be applied easily.
Once resolved I will merge it.
NobodyXu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should fix the pipeline
Where applicable, detect which RUSTFLAGS were set for rustc and convert them into their corresponding cc flags in order to ensure consistent codegen across Rust and non-Rust modules.
f438b0d to
559378c
Compare
|
I squashed the changes into the original commit, don't like unnecessary commit pollution |
NobodyXu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Where applicable, detect which RUSTFLAGS were set for rustc and convert them into their corresponding cc flags in order to ensure consistent codegen across Rust and non-Rust modules.
Resolves #1254