Skip to content

Conversation

lukasoyen
Copy link

While we want to have the default flags before the user flags, this does not apply to the input (-c ...) and output (-o ...) flags, as this prevents the user to mark a .c file as -x c++ via copts = ...

gcc expects that flag before the last -c ...

While we want to have the default flags before the user flags, this does not
apply to the input (-c ...) and output (-o ...) flags, as this prevents
the user to mark a `.c` file as `-x c++` via `copts = ..`.

`gcc` expects that flag before the last `-c ...`
@lukasoyen
Copy link
Author

cc @keith

Copy link
Member

@keith keith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, we should add some tests for this stuff, there's definitely some hyrum's law going on here

can you add a comment like the other one about this ordering

@lukasoyen lukasoyen requested a review from keith June 23, 2025 15:40
@lukasoyen lukasoyen force-pushed the compiler-inputs-after-copts branch from 259a55d to 7495b0a Compare June 23, 2025 15:44
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.

2 participants