Index: tools/llvm-ar/CMakeLists.txt =================================================================== --- tools/llvm-ar/CMakeLists.txt +++ tools/llvm-ar/CMakeLists.txt @@ -17,3 +17,9 @@ add_llvm_tool_symlink(llvm-ranlib llvm-ar) add_llvm_tool_symlink(llvm-lib llvm-ar) add_llvm_tool_symlink(llvm-dlltool llvm-ar) + +if(LLVM_CREATE_BINUTILS_SYMLINKS) + add_llvm_tool_symlink(ar llvm-ar) + add_llvm_tool_symlink(dlltool llvm-ar) + add_llvm_tool_symlink(ranlib llvm-ar) +endif() Index: tools/llvm-cxxfilt/CMakeLists.txt =================================================================== --- tools/llvm-cxxfilt/CMakeLists.txt +++ tools/llvm-cxxfilt/CMakeLists.txt @@ -6,3 +6,7 @@ add_llvm_tool(llvm-cxxfilt llvm-cxxfilt.cpp ) + +if(LLVM_CREATE_BINUTILS_SYMLINKS) + add_llvm_tool_symlink(c++filt llvm-cxxfilt) +endif() Index: tools/llvm-dwp/CMakeLists.txt =================================================================== --- tools/llvm-dwp/CMakeLists.txt +++ tools/llvm-dwp/CMakeLists.txt @@ -15,3 +15,7 @@ DEPENDS intrinsics_gen ) + +if(LLVM_CREATE_BINUTILS_SYMLINKS) + add_llvm_tool_symlink(dwp llvm-dwp) +endif() Index: tools/llvm-nm/CMakeLists.txt =================================================================== --- tools/llvm-nm/CMakeLists.txt +++ tools/llvm-nm/CMakeLists.txt @@ -14,3 +14,7 @@ DEPENDS intrinsics_gen ) + +if(LLVM_CREATE_BINUTILS_SYMLINKS) + add_llvm_tool_symlink(nm llvm-nm) +endif() Index: tools/llvm-objcopy/CMakeLists.txt =================================================================== --- tools/llvm-objcopy/CMakeLists.txt +++ tools/llvm-objcopy/CMakeLists.txt @@ -7,3 +7,7 @@ llvm-objcopy.cpp Object.cpp ) + +if(LLVM_CREATE_BINUTILS_SYMLINKS) + add_llvm_tool_symlink(objcopy llvm-objcopy) +endif() Index: tools/llvm-objdump/CMakeLists.txt =================================================================== --- tools/llvm-objdump/CMakeLists.txt +++ tools/llvm-objdump/CMakeLists.txt @@ -25,3 +25,7 @@ if(HAVE_LIBXAR) target_link_libraries(llvm-objdump ${XAR_LIB}) endif() + +if(LLVM_CREATE_BINUTILS_SYMLINKS) + add_llvm_tool_symlink(objdump llvm-objdump) +endif() Index: tools/llvm-readobj/CMakeLists.txt =================================================================== --- tools/llvm-readobj/CMakeLists.txt +++ tools/llvm-readobj/CMakeLists.txt @@ -23,3 +23,7 @@ ) add_llvm_tool_symlink(llvm-readelf llvm-readobj) + +if(LLVM_CREATE_BINUTILS_SYMLINKS) + add_llvm_tool_symlink(readelf llvm-readobj) +endif() Index: tools/llvm-size/CMakeLists.txt =================================================================== --- tools/llvm-size/CMakeLists.txt +++ tools/llvm-size/CMakeLists.txt @@ -6,3 +6,7 @@ add_llvm_tool(llvm-size llvm-size.cpp ) + +if(LLVM_CREATE_BINUTILS_SYMLINKS) + add_llvm_tool_symlink(size llvm-size) +endif() Index: tools/llvm-strings/CMakeLists.txt =================================================================== --- tools/llvm-strings/CMakeLists.txt +++ tools/llvm-strings/CMakeLists.txt @@ -8,3 +8,6 @@ llvm-strings.cpp ) +if(LLVM_CREATE_BINUTILS_SYMLINKS) + add_llvm_tool_symlink(strings llvm-strings) +endif() Index: tools/llvm-symbolizer/CMakeLists.txt =================================================================== --- tools/llvm-symbolizer/CMakeLists.txt +++ tools/llvm-symbolizer/CMakeLists.txt @@ -14,3 +14,7 @@ add_llvm_tool(llvm-symbolizer llvm-symbolizer.cpp ) + +if(LLVM_CREATE_BINUTILS_SYMLINKS) + add_llvm_tool_symlink(addr2line llvm-symbolizer) +endif()