[llvm-bugs] [Bug 30811] New: Unconditionally passed `-lto_library` to the linker on Darwin confused by symlinks
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Oct 27 10:48:12 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=30811
Bug ID: 30811
Summary: Unconditionally passed `-lto_library` to the linker on
Darwin confused by symlinks
Product: clang
Version: trunk
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: howarth.mailing.lists at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
The change https://reviews.llvm.org/rL285254 to unconditionally pass
`-lto_library` to the linker on Darwin is confused by the use of compiler
symlinks.
This approach doesn't work if the user installs clang in a buried subdirectory
such as /sw/opt/llvm-4.0 but accesses the compilers via a /sw/bin/clang-4.0
symlink pointing at /sw/opt/llvm-4.0/bin/clang-4.0...
$ /sw/bin/clang-4.0 -flto himenoBMTxpa.c
clang-4.0: warning: libLTO.dylib relative to clang installed dir not found;
using 'ld' default search path instead [-Wliblto]
...
"/usr/bin/ld" -demangle -object_path_lto
/var/folders/vh/xthx1f251nqfj804049zl1wm0000gn/T/cc-083c59.o -no_deduplicate
-dynamic -arch x86_64 -macosx_version_min 10.11.0 -o a.out
/var/folders/vh/xthx1f251nqfj804049zl1wm0000gn/T/himenoBMTxpa-34b8ea.o -lSystem
/sw/opt/llvm-4.0/bin/../lib/clang/4.0.0/lib/darwin/libclang_rt.osx.a
$ /sw/opt/llvm-4.0/bin/clang-4.0 -flto himenoBMTxpa.c -v
...
"/usr/bin/ld" -demangle -object_path_lto
/var/folders/vh/xthx1f251nqfj804049zl1wm0000gn/T/cc-afbbef.o -lto_library
/sw/opt/llvm-4.0/lib/libLTO.dylib -no_deduplicate -dynamic -arch x86_64
-macosx_version_min 10.11.0 -o a.out
/var/folders/vh/xthx1f251nqfj804049zl1wm0000gn/T/himenoBMTxpa-44b09e.o -lSystem
/sw/opt/llvm-4.0/bin/../lib/clang/4.0.0/lib/darwin/libclang_rt.osx.a
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20161027/3bf24936/attachment.html>
More information about the llvm-bugs
mailing list