summaryrefslogtreecommitdiff
path: root/cmake/config-ix.cmake
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2019-05-10 19:23:56 +0000
committerPetr Hosek <phosek@chromium.org>2019-05-10 19:23:56 +0000
commita02dc89376d74443913fcd7a12275b6124a08a3a (patch)
tree2c6e86714d763b252c7cee46c1910b204d7e2102 /cmake/config-ix.cmake
parent03c6af9b4f9b2a99af89970b5944288c5bc5299d (diff)
downloadcompiler-rt-a02dc89376d74443913fcd7a12275b6124a08a3a.tar.gz
[crt] Use -std=c11 for crtbegin.o/crtend.o
The source uses C11 syntax such as comments and some compilers print warnings without specifying this flag. Differential Revision: https://reviews.llvm.org/D61797 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@360459 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/config-ix.cmake')
-rw-r--r--cmake/config-ix.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index ca979d95e..f8e34ad6e 100644
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -54,6 +54,7 @@ endif ()
# CodeGen options.
check_c_compiler_flag(-ffreestanding COMPILER_RT_HAS_FFREESTANDING_FLAG)
+check_c_compiler_flag(-std=c11 COMPILER_RT_HAS_STD_C11_FLAG)
check_cxx_compiler_flag(-fPIC COMPILER_RT_HAS_FPIC_FLAG)
check_cxx_compiler_flag(-fPIE COMPILER_RT_HAS_FPIE_FLAG)
check_cxx_compiler_flag(-fno-builtin COMPILER_RT_HAS_FNO_BUILTIN_FLAG)