summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/builtins/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/builtins/CMakeLists.txt')
-rw-r--r--compiler-rt/lib/builtins/CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt
index 0e1ed90eb24..425eee64836 100644
--- a/compiler-rt/lib/builtins/CMakeLists.txt
+++ b/compiler-rt/lib/builtins/CMakeLists.txt
@@ -359,6 +359,8 @@ if (APPLE)
add_subdirectory(macho_embedded)
darwin_add_builtin_libraries(${BUILTIN_SUPPORTED_OS})
elseif (NOT WIN32 OR MINGW)
+ append_string_if(COMPILER_RT_HAS_STD_C99_FLAG -std=c99 maybe_stdc99)
+
foreach (arch ${BUILTIN_SUPPORTED_ARCH})
if (CAN_TARGET_${arch})
# Filter out generic versions of routines that are re-implemented in
@@ -376,7 +378,7 @@ elseif (NOT WIN32 OR MINGW)
STATIC
ARCHS ${arch}
SOURCES ${${arch}_SOURCES}
- CFLAGS "-std=c99"
+ CFLAGS ${maybe_stdc99}
PARENT_TARGET builtins)
endif ()
endforeach ()
OpenPOWER on IntegriCloud