diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2024-05-19 15:41:03 +0900 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2024-05-19 15:52:40 +0900 |
commit | 9d15fc0060b584141674dddfedb06b0b58ad7aae (patch) | |
tree | b6cc5ea51d7996cb3e308bce6ad6867c42319e6f | |
parent | f87ed54e495eba7b9897654de4c17fbf101cb620 (diff) | |
download | llvm-9d15fc0060b584141674dddfedb06b0b58ad7aae.zip llvm-9d15fc0060b584141674dddfedb06b0b58ad7aae.tar.gz llvm-9d15fc0060b584141674dddfedb06b0b58ad7aae.tar.bz2 |
Quick fix for a waning in clang_rt.ctx_profile [-Wgnu-anonymous-struct]
`__sanitizer_siginfo` has been introduced in D142117.
(llvmorg-16-init-17950-ged9ef9b4f248)
It is incompatible to -pedantic.
`clang_rt.ctx_profile` has been introduced in #92456.
-rw-r--r-- | compiler-rt/cmake/config-ix.cmake | 1 | ||||
-rw-r--r-- | compiler-rt/lib/ctx_profile/CMakeLists.txt | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake index ba740af..42edbe1 100644 --- a/compiler-rt/cmake/config-ix.cmake +++ b/compiler-rt/cmake/config-ix.cmake @@ -127,6 +127,7 @@ check_cxx_compiler_flag("-Werror -Wframe-larger-than=512" COMPILER_RT_HAS_WFRAME check_cxx_compiler_flag("-Werror -Wglobal-constructors" COMPILER_RT_HAS_WGLOBAL_CONSTRUCTORS_FLAG) check_cxx_compiler_flag("-Werror -Wc99-extensions" COMPILER_RT_HAS_WC99_EXTENSIONS_FLAG) check_cxx_compiler_flag("-Werror -Wgnu" COMPILER_RT_HAS_WGNU_FLAG) +check_cxx_compiler_flag("-Werror -Wgnu-anonymous-struct" COMPILER_RT_HAS_WGNU_ANONYMOUS_STRUCT_FLAG) check_cxx_compiler_flag("-Werror -Wvariadic-macros" COMPILER_RT_HAS_WVARIADIC_MACROS_FLAG) check_cxx_compiler_flag("-Werror -Wunused-parameter" COMPILER_RT_HAS_WUNUSED_PARAMETER_FLAG) check_cxx_compiler_flag("-Werror -Wcovered-switch-default" COMPILER_RT_HAS_WCOVERED_SWITCH_DEFAULT_FLAG) diff --git a/compiler-rt/lib/ctx_profile/CMakeLists.txt b/compiler-rt/lib/ctx_profile/CMakeLists.txt index d69cdf5..ce491fc 100644 --- a/compiler-rt/lib/ctx_profile/CMakeLists.txt +++ b/compiler-rt/lib/ctx_profile/CMakeLists.txt @@ -15,6 +15,9 @@ include_directories(../../include) # We don't use the C++ Standard Library here, so avoid including it by mistake. append_list_if(COMPILER_RT_HAS_NOSTDINCXX_FLAG -nostdinc++ EXTRA_FLAGS) +# __sanitizer_siginfo +append_list_if(COMPILER_RT_HAS_WGNU_ANONYMOUS_STRUCT_FLAG -Wno-gnu-anonymous-struct EXTRA_FLAGS) + if(COMPILER_RT_INCLUDE_TESTS) add_subdirectory(tests) endif() |