summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Potapenko <glider@google.com>2012-09-12 15:44:56 +0000
committerAlexander Potapenko <glider@google.com>2012-09-12 15:44:56 +0000
commit8019524fdba2eb50ea6fac5f07d938165ad1e065 (patch)
tree1948b160aef0ea4edd23d7c47e93caddd3c4cc33
parentca2cdd989076d091d8c4d4c277f8b47d9b5903ad (diff)
downloadcompiler-rt-8019524fdba2eb50ea6fac5f07d938165ad1e065.tar.gz
compiler-rt-8019524fdba2eb50ea6fac5f07d938165ad1e065.tar.bz2
compiler-rt-8019524fdba2eb50ea6fac5f07d938165ad1e065.tar.xz
Pass -std=c99 when compiling mach_override.c
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163717 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/interception/CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/interception/CMakeLists.txt b/lib/interception/CMakeLists.txt
index 00a3e8bf..2ebb9bec 100644
--- a/lib/interception/CMakeLists.txt
+++ b/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})