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

via libc-commits libc-commits at lists.llvm.org
Thu Oct 24 02:41:44 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Simon Tatham (statham-arm)

<details>
<summary>Changes</summary>

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.

---
Full diff: https://github.com/llvm/llvm-project/pull/113540.diff


1 Files Affected:

- (modified) libc/cmake/modules/LLVMLibCCompileOptionRules.cmake (+1-1) 


``````````diff
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)

``````````

</details>


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


More information about the libc-commits mailing list