steven_wu added a comment.

I do prefer the current approach especially on Darwin. Some concerns of 
switching to use "-L + -l" are:

1. clang and compiler-rt are rev-locked. Inferring the compiler-rt from 
resource-dir and passing to linker with the full path can prevent mistakes of 
mixing them up.
2. This change does change linker semantics on Darwin. ld64 treats the inputs 
from command line with highest priority. Currently ld64 will use compiler-rt 
symbols before any other libraries passed in with -l flag. If clang decide to 
pass compiler-rt with -l flag, any other libraries (static or dynamic) that 
passed with -l flag will takes the priority over compiler-rt. This can lead to 
unexpected behavior.


Repository:
  rC Clang

https://reviews.llvm.org/D51440



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to