diff options
Diffstat (limited to 'compiler-rt/lib/interception')
-rw-r--r-- | compiler-rt/lib/interception/CMakeLists.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler-rt/lib/interception/CMakeLists.txt b/compiler-rt/lib/interception/CMakeLists.txt index 00a3e8bf1e9..2ebb9becef6 100644 --- a/compiler-rt/lib/interception/CMakeLists.txt +++ b/compiler-rt/lib/interception/CMakeLists.txt @@ -6,11 +6,16 @@ set(INTERCEPTION_SOURCES interception_win.cc ) +set(MACH_OVERRIDE_SOURCES + mach_override/mach_override.c + ) + # Only add this C file if we're building on a Mac. Other source files can be # harmlessly compiled on any platform, but the C file is complained about due # to pedantic rules about empty translation units. if (APPLE) - list(APPEND INTERCEPTION_SOURCES mach_override/mach_override.c) + list(APPEND INTERCEPTION_SOURCES ${MACH_OVERRIDE_SOURCES}) + set_source_files_properties(${MACH_OVERRIDE_SOURCES} PROPERTIES COMPILE_FLAGS "-std=c99 ${INTERCEPTION_CFLAGS}") endif () set(INTERCEPTION_CFLAGS ${SANITIZER_COMMON_CFLAGS}) |