[PATCH] D62111: Tweaks for setting CMAKE_LINKER to lld-link

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 20 20:00:58 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rGc6f363f578fb: Tweaks for setting CMAKE_LINKER to lld-link (authored by thakis).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62111/new/

https://reviews.llvm.org/D62111

Files:
  llvm/cmake/modules/HandleLLVMOptions.cmake


Index: llvm/cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- llvm/cmake/modules/HandleLLVMOptions.cmake
+++ llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -12,7 +12,7 @@
 include(CheckCXXCompilerFlag)
 include(CheckSymbolExists)
 
-if(CMAKE_LINKER MATCHES "lld-link\\.exe" OR (WIN32 AND LLVM_USE_LINKER STREQUAL "lld") OR LLVM_ENABLE_LLD)
+if(CMAKE_LINKER MATCHES "lld-link" OR (WIN32 AND LLVM_USE_LINKER STREQUAL "lld") OR LLVM_ENABLE_LLD)
   set(LINKER_IS_LLD_LINK TRUE)
 else()
   set(LINKER_IS_LLD_LINK FALSE)
@@ -685,14 +685,8 @@
   elseif (CLANG_CL)
     # Keep frame pointers around.
     append("/Oy-" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
-    if (LINKER_IS_LLD_LINK)
-      # Use DWARF debug info with LLD.
-      append("-gdwarf" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
-    else()
-      # Enable codeview otherwise.
-      append("/Z7" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
-    endif()
     # Always ask the linker to produce symbols with asan.
+    append("/Z7" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
     append("-debug" CMAKE_EXE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
   endif()
 endmacro()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62111.200390.patch
Type: text/x-patch
Size: 1165 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190521/e1c0610b/attachment.bin>


More information about the llvm-commits mailing list