protze.joachim added a comment.

I still see some clang-specific and system link directories listed in the 
linker line before the directories from `LIBRARY_PATH`:

  $ LIBRARY_PATH=test1 /usr/local/clang/bin/clang -Ltest2 -v hello.c
   "/usr/bin/ld" .../crtbegin.o -Ltest2 
-L/usr/lib/gcc/x86_64-redhat-linux/4.8.5 
-L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64 -L/lib/../lib64 
-L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../.. 
-L/usr/local/clang/bin/../lib -L/lib -L/usr/lib -Ltest1

I think they are inserted by `ToolChain.AddFilePathLibArgs` in Gnu.cpp. Is this 
the intended ordering? My expectation would be

  $ LIBRARY_PATH=test1 /usr/local/clang/bin/clang -Ltest2 -v hello.c
   "/usr/bin/ld" .../crtbegin.o -Ltest2 -Ltest1 
-L/usr/lib/gcc/x86_64-redhat-linux/4.8.5 
-L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64 -L/lib/../lib64 
-L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../.. 
-L/usr/local/clang/bin/../lib -L/lib -L/usr/lib

@hfinkel any opinion?


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65880/new/

https://reviews.llvm.org/D65880

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D65880: [Driver] Mo... Joachim Protze via Phabricator via cfe-commits

Reply via email to