This is implemented by the lld-link option -include:, just like --require-defined. Contrary to --require-defined, the -u/--undefined option allows the symbol to remain undefined in the end.
This should fix PR42121.
Paths
| Differential D62876
[LLD] [MinGW] Support the -u/--undefined option. ClosedPublic Authored by mstorsjo on Jun 4 2019, 1:23 PM.
Details Summary This is implemented by the lld-link option -include:, just like --require-defined. Contrary to --require-defined, the -u/--undefined option allows the symbol to remain undefined in the end. This should fix PR42121.
Diff Detail Event TimelineComment Actions lgtm
This revision is now accepted and ready to land.Jun 4 2019, 3:36 PM Comment Actions This is LGTM, but I believe you will have to implement -u in a more correct way. IIRC, I implemented -u as -require-defined in the ELF linker first. It seemed to be working fine until we found something weird, investigated it and then found that that was caused by an incorrect implementation of -u. So, if it is not too hard, you probably should implement it in the right way. Closed by commit rL362882: [MinGW] Support the -u/--undefined option. (authored by mstorsjo). · Explain WhyJun 8 2019, 11:23 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 203428 MinGW/Driver.cpp
MinGW/Options.td
test/MinGW/driver.test
|
Interesting, I've always interpreted it as -require-defined.