[lld] [LLD] [COFF] Print a warning when using /dependentloadflag without load config (PR #117400)
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 2 01:20:48 PST 2024
================
@@ -29,3 +30,4 @@ FAIL: lld-link: error: /dependentloadflag: invalid argument: zz
FAIL-RANGE: lld-link: error: /dependentloadflag: invalid argument: 0xf0000
FAIL-NOARG: lld-link: error: /dependentloadflag: no argument specified
+WARN-NOBASE: lld-link: warning: _load_config_used not found, /delayloadflag will have no effect
----------------
mstorsjo wrote:
I needed to remove the `/nodefaultlib` to make it actually do the thing I wanted to test, having `%t.ldcfg-defaultlib.lib` contain a `/defaultlib:` directive, that pulls in another library - with `/nodefaultlib` it would ignore those.
Linking without `/nodefaultlib` doesn't pull in the default CRT libs automatically, only if the object files tells it to. In this case, `%S/Inputs/precomp-a.obj` contains such directives, but I switched that to a different object file for the entry, which doesn't reference `LIBCMT.LIB` and such.
https://github.com/llvm/llvm-project/pull/117400
More information about the llvm-commits
mailing list