install-wrappers: Install wrappers named <target>-llvm-ar and <target>-llvm-ranlib
This is necessary for CMake to detect working IPO (LTO); if the
compiler is named <target>-{gcc,clang}, CMake expects to find
matching tools named <target>-llvm-{ar,ranlib} too. (The CMake
module CheckIPOSupported and function check_ipo_supported expects
to have CMAKE_LANG_COMPILER_AR and ..._RANLIB set to working tools;
the Clang-FindBinUtils.cmake module looks for tools named
llvm-ar/llvm-ranlib with the same prefix as the compiler.)
This commit is contained in:
1 parent
087255e28a
commit
d57de8ba8b
1 file changed
+9
-2
+9
-2
@@ -88,11 +88,18 @@ for arch in $ARCHS; do
|
||||
for exec in clang clang++ gcc g++ c++ as; do
|
||||
ln -sf clang-target-wrapper$CTW_SUFFIX $arch-w64-$target_os-$exec$CTW_LINK_SUFFIX
|
||||
done
|
||||
for exec in addr2line ar ranlib nm objcopy readelf strings strip; do
|
||||
for exec in addr2line ar ranlib nm objcopy readelf strings strip llvm-ar llvm-ranlib; do
|
||||
if [ -n "$HOST" ]; then
|
||||
link_target=llvm-wrapper
|
||||
else
|
||||
link_target=llvm-$exec
|
||||
case $exec in
|
||||
llvm-*)
|
||||
link_target=$exec
|
||||
;;
|
||||
*)
|
||||
link_target=llvm-$exec
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
ln -sf $link_target$EXEEXT $arch-w64-$target_os-$exec$EXEEXT || true
|
||||
done
|
||||
|
||||
Reference in new issue
Block a user