Skip to content

Commit 862dc3c

Browse files
move check out of loop
1 parent b96823a commit 862dc3c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

libc/cmake/modules/CheckCompilerFeatures.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,8 @@ foreach(feature IN LISTS ALL_COMPILER_FEATURES)
5757
endforeach()
5858

5959
message(STATUS "Compiler features available: ${AVAILABLE_COMPILER_FEATURES}")
60+
61+
### Compiler Feature Detection ###
62+
63+
# clang-8+, gcc-12+
64+
check_cxx_compiler_flag("-ftrivial-auto-var-init=pattern" LIBC_CC_SUPPORTS_PATTERN_INIT)

libc/cmake/modules/LLVMLibCObjectRules.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ function(_get_common_compile_options output_var flags)
4141
list(APPEND compile_options "-fno-unwind-tables")
4242
list(APPEND compile_options "-fno-asynchronous-unwind-tables")
4343
list(APPEND compile_options "-fno-rtti")
44-
# clang-8+, gcc-12+
45-
check_cxx_compiler_flag("-ftrivial-auto-var-init=pattern" LIBC_CC_SUPPORTS_PATTERN_INIT)
4644
if (LIBC_CC_SUPPORTS_PATTERN_INIT)
4745
list(APPEND compile_options "-ftrivial-auto-var-init=pattern")
4846
endif()

0 commit comments

Comments
 (0)