[PATCH] D14233: [tsan] CMake support for TSan on OS X
Kuba Brecka via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 3 06:15:08 PST 2015
kubabrecka added inline comments.
================
Comment at: lib/tsan/CMakeLists.txt:101-104
@@ +100,6 @@
+ if(arch STREQUAL "x86_64")
+ set(TSAN_ASM_SOURCES rtl/tsan_rtl_amd64.S)
+ # Pass ASM file directly to the C++ compiler.
+ set_source_files_properties(${TSAN_ASM_SOURCES} PROPERTIES
+ LANGUAGE C)
+ # Sanity check for Go runtime.
----------------
ismailp wrote:
> I have a diff here. This might be currently irrelevant, but I'll post it here for future reference. To get it working with Xcode, I've done:
> ```
> + set(TSAN_ASM_SOURCES rtl/tsan_rtl_amd64.S)
> + # Xcode will try to compile this file as C ('clang -x c'), and that will fail.
> + if (${CMAKE_GENERATOR} STREQUAL "Xcode")
> + enable_language(ASM)
> + else()
> + # Pass ASM file directly to the C++ compiler.
> + set_source_files_properties(${TSAN_ASM_SOURCES} PROPERTIES
> + LANGUAGE C)
> + endif()
> ```
> Did you try Xcode generator? Xcode's built-in build rules might be overriding compiler flags passed from the CMake generated Xcode project with for these S files. Because it works with Ninja generator, but fails with Xcode.
I see. I was only testing on a debug build, which doesn't use `HACKY_CALL` and thus the assembly file is not needed at all. Let me now commit this without using the assembly file (and #ifdef'ing it out) and we can take a look at it later.
http://reviews.llvm.org/D14233
More information about the llvm-commits
mailing list