Uh oh!
There was an error while loading. Please reload this page.
adding static and dynamic ZigEquivalent enums so that zig cc can force static or dynamic linking. - #12894
Conversation
kubkon
left a comment
There was a problem hiding this comment.
Thanks for this change! In order to land this, we need to fix how changes to src/clang_options_data.zig are generated which actually happens automatically via running the tool tools/update_clang_options.zig. Have a look at the review comments and lemme know if that makes sense to you!
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
4488aa4 to
b712863Comparecod1r
commented
Sep 19, 2022
apologies for the messy commits. there are a lot of git features I have yet to use. I think I made the right changes in the right files like you asked. if not, I'll be happy to do more. :) |
a34cf4b to
aeff02fCompare…ch to set `link_mode` properly when we iterate over the clang arguments. also replaced `dynamic` flag in clang_options_data.zig with proper definition similarly to `static`.
aeff02f to
2759981Compareandrewrk
commented
Oct 18, 2022
Reverted in 4f9345d. |
andrewrk
commented
Oct 18, 2022
This change may have been correct as is. If so, it exposed a bug in LLVM's cmake configuration which incorrectly adds However, even if this is the case, more investigation is needed. An upstream bug report needs to be created, and we need a workaround so that zig-bootstrap continues to work. Another possibility is that the |
When adding the flag
-dynamic,zig ccwould still statically link by default becauselink_modewas set tonull.Adding the ZigEquivalent enums
staticanddynamicallows us to branch properly to setlink_modewhen we iterate over the arguments passed intoClangArgIteratorwhenarg_modeis equivalent to.cc.This should close#11909.
Documentation used: Clang CLI Reference and zig's source code.