Skip to content

[libc][complex] remove -ffreestanding flag from MPFRUtils compile options #124702

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
Jan 28, 2025

Conversation

Sh0g0-1758
Copy link
Member

Fixes buildbot error in #121261

@llvmbot llvmbot added the libc label Jan 28, 2025
@llvmbot
Copy link
Member

llvmbot commented Jan 28, 2025

@llvm/pr-subscribers-libc

Author: Shourya Goel (Sh0g0-1758)

Changes

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

@Sh0g0-1758 Sh0g0-1758 merged commit 839cdb5 into llvm:main Jan 28, 2025
14 of 15 checks passed
@nickdesaulniers
Copy link
Member

Please wait for reviewers for all llvm-libc patches (unless you're reverting to unbreak the build). #124765 seems to be an additional fix required.

@Sh0g0-1758
Copy link
Member Author

uhuh, I expected it to make the bot green. I was told to not keep the bots red for long and my timezone is the exact opposite to yours (12 hours ahead). So merged it. Will wait from next time.

@nickdesaulniers
Copy link
Member

I think we can satisfy keeping the bots green AND waiting for reviews by having a "revert early, revert often" policy (which is very common throughout llvm). If you don't need to wait for reviews for reverts, and you're not confident in "forward fixes" then do consider reverting.

@Sh0g0-1758
Copy link
Member Author

sure thing. Will keep this in mind from now on.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jan 28, 2025

LLVM Buildbot has detected a new failure on builder premerge-monolithic-linux running on premerge-linux-1 while building libc at step 7 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/21123

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
...
PASS: UBSan-Minimal-x86_64 :: TestCases/recover-dedup-limit.cpp (93921 of 97973)
PASS: UBSan-MemorySanitizer-x86_64 :: TestCases/TypeCheck/null.cpp (93922 of 97973)
PASS: UBSan-MemorySanitizer-x86_64 :: TestCases/Pointer/nullptr-and-nonzero-offset-summary.cpp (93923 of 97973)
PASS: UBSan-Standalone-lld-x86_64 :: TestCases/ImplicitConversion/integer-sign-change-summary.cpp (93924 of 97973)
PASS: UBSan-MemorySanitizer-x86_64 :: TestCases/TypeCheck/vptr-non-unique-typeinfo.cpp (93925 of 97973)
PASS: UBSan-Standalone-lld-x86_64 :: TestCases/Float/cast-overflow.cpp (93926 of 97973)
PASS: UBSan-MemorySanitizer-x86_64 :: TestCases/TypeCheck/Function/function.cpp (93927 of 97973)
PASS: UBSan-Standalone-lld-x86_64 :: TestCases/ImplicitConversion/signed-integer-truncation-or-sign-change-summary.cpp (93928 of 97973)
PASS: UBSan-MemorySanitizer-x86_64 :: TestCases/Misc/Posix/diag-stacktrace.cpp (93929 of 97973)
TIMEOUT: MLIR :: Examples/standalone/test.toy (93930 of 97973)
******************** TEST 'MLIR :: Examples/standalone/test.toy' FAILED ********************
Exit Code: 1
Timeout: Reached timeout of 60 seconds

Command Output (stdout):
--
# RUN: at line 1
"/etc/cmake/bin/cmake" "/build/buildbot/premerge-monolithic-linux/llvm-project/mlir/examples/standalone" -G "Ninja"  -DCMAKE_CXX_COMPILER=/usr/bin/clang++  -DCMAKE_C_COMPILER=/usr/bin/clang   -DLLVM_ENABLE_LIBCXX=OFF -DMLIR_DIR=/build/buildbot/premerge-monolithic-linux/build/lib/cmake/mlir  -DLLVM_USE_LINKER=lld  -DPython3_EXECUTABLE="/usr/bin/python3.10"
# executed command: /etc/cmake/bin/cmake /build/buildbot/premerge-monolithic-linux/llvm-project/mlir/examples/standalone -G Ninja -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_C_COMPILER=/usr/bin/clang -DLLVM_ENABLE_LIBCXX=OFF -DMLIR_DIR=/build/buildbot/premerge-monolithic-linux/build/lib/cmake/mlir -DLLVM_USE_LINKER=lld -DPython3_EXECUTABLE=/usr/bin/python3.10
# .---command stdout------------
# | -- The CXX compiler identification is Clang 16.0.6
# | -- The C compiler identification is Clang 16.0.6
# | -- Detecting CXX compiler ABI info
# | -- Detecting CXX compiler ABI info - done
# | -- Check for working CXX compiler: /usr/bin/clang++ - skipped
# | -- Detecting CXX compile features
# | -- Detecting CXX compile features - done
# | -- Detecting C compiler ABI info
# | -- Detecting C compiler ABI info - done
# | -- Check for working C compiler: /usr/bin/clang - skipped
# | -- Detecting C compile features
# | -- Detecting C compile features - done
# | -- Looking for histedit.h
# | -- Looking for histedit.h - found
# | -- Found LibEdit: /usr/include (found version "2.11") 
# | -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") 
# | -- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.9.13") 
# | -- Using MLIRConfig.cmake in: /build/buildbot/premerge-monolithic-linux/build/lib/cmake/mlir
# | -- Using LLVMConfig.cmake in: /build/buildbot/premerge-monolithic-linux/build/lib/cmake/llvm
# | -- Linker detection: unknown
# | -- Performing Test LLVM_LIBSTDCXX_MIN
# | -- Performing Test LLVM_LIBSTDCXX_MIN - Success
# | -- Performing Test LLVM_LIBSTDCXX_SOFT_ERROR
# | -- Performing Test LLVM_LIBSTDCXX_SOFT_ERROR - Success
# | -- Performing Test CXX_SUPPORTS_CUSTOM_LINKER
# | -- Performing Test CXX_SUPPORTS_CUSTOM_LINKER - Success
# | -- Performing Test C_SUPPORTS_FPIC
# | -- Performing Test C_SUPPORTS_FPIC - Success
# | -- Performing Test CXX_SUPPORTS_FPIC

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.

4 participants