[lld] [LLD] [COFF] Print a warning when using /dependentloadflag without load config (PR #117400)

Aleksei Nurmukhametov via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 2 11:42:42 PST 2024


nurmukhametov wrote:

> only sets the `DependentLoadFlags` field of `_load_config_used` if it is set to a non-zero value. This means passing `/dependentloadflag:0` is effectively a no-op, so that if the `_load_config_used` struct already has a non-zero value set in that field, LLD will _not_ clear the flag. I am not sure if this is intended – if it is, then setting it to 0 should probably not give the warning. (CC @nurmukhametov @tru @aganea from #71537)

It looks intended to match the behavior of the MSVC linker. See here: https://github.com/nurmukhametov/llvm-project/blob/e72c949c15208ba3dd53a9cebfee02734965a678/lld/test/COFF/deploadflag-cfg-x64.s#L11

https://github.com/llvm/llvm-project/pull/117400


More information about the llvm-commits mailing list