[libc-commits] [libc] [libc][complex] remove -ffreestanding flag from MPFRUtils compile options (PR #124702)

via libc-commits libc-commits at lists.llvm.org
Mon Jan 27 21:46:43 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Shourya Goel (Sh0g0-1758)

<details>
<summary>Changes</summary>

Fixes buildbot error in #<!-- -->121261

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


1 Files Affected:

- (modified) libc/utils/MPFRWrapper/CMakeLists.txt (+2) 


``````````diff
diff --git a/libc/utils/MPFRWrapper/CMakeLists.txt b/libc/utils/MPFRWrapper/CMakeLists.txt
index 829c2fb2c2f908..8aeee2463dc51f 100644
--- a/libc/utils/MPFRWrapper/CMakeLists.txt
+++ b/libc/utils/MPFRWrapper/CMakeLists.txt
@@ -28,6 +28,8 @@ if(LIBC_TESTS_CAN_USE_MPFR)
     MPFRUtils.h
   )
   _get_common_test_compile_options(compile_options "" "")
+  # mpfr/gmp headers do not work with -ffreestanding flag.
+  list(REMOVE_ITEM compile_options "-ffreestanding")
   target_compile_options(libcMPFRWrapper PRIVATE -O3 ${compile_options})
   add_dependencies(
     libcMPFRWrapper

``````````

</details>


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


More information about the libc-commits mailing list