[PATCH] [ASan/Win] Use clang rather than clang-cl by default for lit tests. Make Windows-only tests explicitly use clang-cl.

Alexey Samsonov vonosmas at gmail.com
Fri May 23 15:07:29 PDT 2014


================
Comment at: cmake/Modules/AddCompilerRT.cmake:151
@@ -151,3 +150,3 @@
     COMMAND ${COMPILER_RT_TEST_COMPILER} ${TEST_OBJECTS}
-            ${COMPILER_RT_TEST_COMPILER_EXE}"${output_bin}"
+            -o"${output_bin}"
             ${TEST_LINK_FLAGS}
----------------
Restore a space here.

================
Comment at: cmake/Modules/CompilerRTCompile.cmake:24
@@ +23,3 @@
+  if(MSVC)
+    string(REPLACE ";/" ";-" global_flags "${global_flags}")
+  endif()
----------------
what if the first element of global_flags starts with / ?

================
Comment at: cmake/Modules/CompilerRTCompile.cmake:33
@@ -27,3 +32,3 @@
     COMMAND ${COMPILER_RT_TEST_COMPILER} ${compile_flags} -c
-            ${COMPILER_RT_TEST_COMPILER_OBJ}"${object_file}"
+            -o"${object_file}"
             ${source_rpath}
----------------
and here.

================
Comment at: lib/asan/tests/CMakeLists.txt:29
@@ -28,1 +28,3 @@
   -I${COMPILER_RT_SOURCE_DIR}/lib/sanitizer_common/tests
+  -DGTEST_HAS_RTTI=0
+  -fno-rtti
----------------
Consider adding this (and, probably, -DGTEST_HAS_SEH=0 on Windows) to COMPILER_RT_GTEST_CFLAGS definition instead.

================
Comment at: lib/asan/tests/CMakeLists.txt:31
@@ +30,3 @@
+  -fno-rtti
+  -gline-tables-only
+  -O2
----------------
Any particular reason to switch to -gline-tables-only from -g here?

http://reviews.llvm.org/D3893






More information about the llvm-commits mailing list