Skip to content

[libc] Pass through LIBC_CONF_MATH_OPTIMIZATIONS correctly #113540

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

statham-arm
Copy link
Collaborator

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.

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.
@llvmbot
Copy link
Member

llvmbot commented Oct 24, 2024

@llvm/pr-subscribers-libc

Author: Simon Tatham (statham-arm)

Changes

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

@statham-arm statham-arm merged commit c7aff2a into llvm:main Oct 24, 2024
9 checks passed
@statham-arm statham-arm deleted the libc-conf-math-optimizations branch October 24, 2024 13:51
@frobtech frobtech mentioned this pull request Oct 25, 2024
NoumanAmir657 pushed a commit to NoumanAmir657/llvm-project that referenced this pull request Nov 4, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants