[libc][NFC] Add -fno-lax-vector-conversions compilation flag
authorGuillaume Chatelet <gchatelet@google.com>
Tue, 27 Dec 2022 08:25:32 +0000 (08:25 +0000)
committerGuillaume Chatelet <gchatelet@google.com>
Tue, 27 Dec 2022 08:25:32 +0000 (08:25 +0000)
libc/cmake/modules/LLVMLibCObjectRules.cmake
utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl

index 3502bcf..35c016d 100644 (file)
@@ -23,6 +23,7 @@ function(_get_common_compile_options output_var flags)
     list(APPEND compile_options "-ffreestanding")
     list(APPEND compile_options "-fno-builtin")
     list(APPEND compile_options "-fno-exceptions")
+    list(APPEND compile_options "-fno-lax-vector-conversions")
     list(APPEND compile_options "-fno-unwind-tables")
     list(APPEND compile_options "-fno-asynchronous-unwind-tables")
     list(APPEND compile_options "-fno-rtti")
index 6a4c1a5..7b5e9a1 100644 (file)
@@ -69,6 +69,7 @@ def libc_function(
     copts = copts or []
     copts.append("-O3")
     copts.append("-fno-builtin")
+    copts.append("-fno-lax-vector-conversions")
 
     # We compile the code twice, the first target is suffixed with ".__internal__" and contains the
     # C++ functions in the "__llvm_libc" namespace. This allows us to test the function in the