[llvm-dev] LIBRARY_PATH ignored?

chiasa.men via llvm-dev llvm-dev at lists.llvm.org
Mon Jan 17 04:59:26 PST 2022


I use the LIBRARY_PATH variable since the actual path contains spaces which
break the make files

Below I try to supply paths A (via ENV) and B (via -L) to the linker, but only
B (-L) is considered for the following '/usr/bin/lld-link' call

LIBRARY_PATH='A' /usr/bin/clang -fuse-ld=lld -target x86_64-pc-win32  -v -Wl,-
machine:x64 -Wno-msvc-not-found -DNO_FSEEKO -DNO_STRERROR -DNO_vsnprintf -o
example example.o -L. libz.a -L B
clang version 14.0.0 (/mnt/ssd/pikaur/build/llvm-git/llvm-project
75b08cce47df0a405bfb052f51d70b8e8067d705)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: /usr/bin
 "/usr/bin/lld-link" -out:example -defaultlib:libcmt -defaultlib:oldnames -
libpath:lib/amd64 -libpath:atlmfc/lib/amd64 -libpath:. -libpath:B -nologo -
machine:x64 example.o libz.a
lld-link: error: could not open 'libcmt.lib': No such file or directory
lld-link: error: could not open 'oldnames.lib': No such file or directory
clang-14: error: linker command failed with exit code 1 (use -v to see
invocation)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20220117/fd6f0451/attachment.html>


More information about the llvm-dev mailing list