[libc-commits] [llvm] [libc] [libc] default enable -ftrivial-auto-var-init=pattern (PR #78776)

via libc-commits libc-commits at lists.llvm.org
Fri Jan 19 12:49:26 PST 2024


================
@@ -41,6 +41,11 @@ function(_get_common_compile_options output_var flags)
     list(APPEND compile_options "-fno-unwind-tables")
     list(APPEND compile_options "-fno-asynchronous-unwind-tables")
     list(APPEND compile_options "-fno-rtti")
+    # clang-8+, gcc-12+
+    check_cxx_compiler_flag("-ftrivial-auto-var-init=pattern" LIBC_CC_SUPPORTS_PATTERN_INIT)
----------------
lntue wrote:

Can you move this check outside of this function, as it is called quite a lot?  Either to the top of the file, or to somewhere in `CheckCompilerFeatures.cmake`.

https://github.com/llvm/llvm-project/pull/78776


More information about the libc-commits mailing list