Author: smeenai Date: Thu Jun 14 16:26:33 2018 New Revision: 334780 URL: http://llvm.org/viewvc/llvm-project?rev=334780&view=rev Log: [cmake] Add linker detection for Apple platforms
LLVM currently assumes that Apple platforms will always use ld64. In the future, LLD Mach-O might also be supported, so add the beginnings of linker detection support. ld64 is currently the only detected linker, since `ld64.lld -v` doesn't yield any useful version output, but we can add that detection later, and in the meantime it's still useful to have the ld64 identification. Switch clang's order file check to use this new detection rather than just checking for the presence of an ld64 executable. Differential Revision: https://reviews.llvm.org/D48201 Modified: cfe/trunk/tools/driver/CMakeLists.txt Modified: cfe/trunk/tools/driver/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/CMakeLists.txt?rev=334780&r1=334779&r2=334780&view=diff ============================================================================== --- cfe/trunk/tools/driver/CMakeLists.txt (original) +++ cfe/trunk/tools/driver/CMakeLists.txt Thu Jun 14 16:26:33 2018 @@ -99,10 +99,10 @@ if (APPLE) endif() if(CLANG_ORDER_FILE AND - (LD64_EXECUTABLE OR LLVM_LINKER_IS_GOLD OR LLVM_LINKER_IS_LLD)) + (LLVM_LINKER_IS_LD64 OR LLVM_LINKER_IS_GOLD OR LLVM_LINKER_IS_LLD)) include(CheckLinkerFlag) - if (LD64_EXECUTABLE) + if (LLVM_LINKER_IS_LD64) set(LINKER_ORDER_FILE_OPTION "-Wl,-order_file,${CLANG_ORDER_FILE}") elseif (LLVM_LINKER_IS_GOLD) set(LINKER_ORDER_FILE_OPTION "-Wl,--section-ordering-file,${CLANG_ORDER_FILE}") _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits