[PATCH] [CMake] Finish off the clang-cl self host build

Reid Kleckner rnk at google.com
Tue Feb 24 18:43:46 PST 2015


================
Comment at: cmake/modules/AddLLVM.cmake:13
@@ -12,3 +12,3 @@
   # targets can use to force EH
-  if(LLVM_REQUIRES_EH OR LLVM_ENABLE_EH)
+  if((LLVM_REQUIRES_EH OR LLVM_ENABLE_EH) AND NOT LLVM_EH_UNSUPPORTED)
     if(NOT (LLVM_REQUIRES_RTTI OR LLVM_ENABLE_RTTI))
----------------
Won't 'NOT LLVM_EH_UNSUPPORTED' always be true? Normally it's undefined, but you set it to 0 in HandleLLVMOptions.

================
Comment at: cmake/modules/AddLLVM.cmake:23
@@ -22,2 +22,3 @@
       list(APPEND LLVM_COMPILE_DEFINITIONS _HAS_EXCEPTIONS=0)
+      list(APPEND LLVM_COMPILE_DEFINITIONS "GTEST_HAS_SEH=0")
       list(APPEND LLVM_COMPILE_FLAGS "/EHs-c-")
----------------
This should be under if(CLANG_CL) right? Otherwise gtest binaries can't recover from crashes and run the rest of the tests, which is semi-useful functionality.

================
Comment at: cmake/modules/HandleLLVMOptions.cmake:31-32
@@ +30,4 @@
+      set(LLVM_EH_UNSUPPORTED 0)
+      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Qunused-arguments")
+      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments")
+
----------------
I'm starting to feel like clang-cl should just silently ignore /Fd. Mind sending that patch instead? Otherwise, this needs a comment about /Fd.

http://reviews.llvm.org/D7875

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list