[libc-commits] [libc] c7aff2a - [libc] Pass through LIBC_CONF_MATH_OPTIMIZATIONS correctly (#113540)

via libc-commits libc-commits at lists.llvm.org
Thu Oct 24 06:51:42 PDT 2024


Author: Simon Tatham
Date: 2024-10-24T14:51:38+01:00
New Revision: c7aff2ab4cfcc3cc4d43e8b9a3663096ab1e8f10

URL: https://github.com/llvm/llvm-project/commit/c7aff2ab4cfcc3cc4d43e8b9a3663096ab1e8f10
DIFF: https://github.com/llvm/llvm-project/commit/c7aff2ab4cfcc3cc4d43e8b9a3663096ab1e8f10.diff

LOG: [libc] Pass through LIBC_CONF_MATH_OPTIMIZATIONS correctly (#113540)

It's checked in a cmake function that builds up a list called
`config_options`. But the check was appending to a list called
`compile_options`, so the intended `-DLIBC_MATH=whatever` didn't end up
on the actual compile command lines.

Added: 
    

Modified: 
    libc/cmake/modules/LLVMLibCCompileOptionRules.cmake

Removed: 
    


################################################################################
diff  --git a/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake b/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
index 0c658c6866c437..e30f7d322eb029 100644
--- a/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
+++ b/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
@@ -84,7 +84,7 @@ function(_get_compile_options_from_config output_var)
   endif()
 
   if(LIBC_CONF_MATH_OPTIMIZATIONS)
-    list(APPEND compile_options "-DLIBC_MATH=${LIBC_CONF_MATH_OPTIMIZATIONS}")
+    list(APPEND config_options "-DLIBC_MATH=${LIBC_CONF_MATH_OPTIMIZATIONS}")
   endif()
 
   set(${output_var} ${config_options} PARENT_SCOPE)


        


More information about the libc-commits mailing list