[lld] [LLD] [COFF] Print a warning when using /dependentloadflag without load config (PR #117400)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 2 01:10:37 PST 2024
================
@@ -2307,8 +2307,11 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
// Handle /dependentloadflag
for (auto *arg :
- args.filtered(OPT_dependentloadflag, OPT_dependentloadflag_opt))
+ args.filtered(OPT_dependentloadflag, OPT_dependentloadflag_opt)) {
parseDependentLoadFlags(arg);
+ if (!ctx.symtab.findUnderscore("_load_config_used"))
+ warn("_load_config_used not found, /delayloadflag will have no effect");
+ }
----------------
alvinhochun wrote:
In addition, the current code would emit one warning per every `/dependentloadflag` flag specified (when multiple are passed, only the last one would take effect).
Also, I just noticed the typo – the warning message refers to "/delayloadflag" instead of `/dependentloadflag`.
https://github.com/llvm/llvm-project/pull/117400
More information about the llvm-commits
mailing list