[compiler-rt] ca68a14 - Revert "Revert "Revert "[compiler-rt] Allow building builtins.a without a libc (#86737)"""

Jon Chesterfield via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 31 15:39:58 PDT 2024


Author: Jon Chesterfield
Date: 2024-03-31T23:17:05+01:00
New Revision: ca68a14eb822d88bc32d511258f261e88dd6b7d6

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

LOG: Revert "Revert "Revert "[compiler-rt] Allow building builtins.a without a libc (#86737)"""

This reverts commit d2b63ed0ca5c7eb3f8fc029e3a5705cf0ddab438. CI again.
Leading theory is bad interaction between cmake and buildbot, some guesses at PR86737

Added: 
    

Modified: 
    compiler-rt/cmake/config-ix.cmake

Removed: 
    


################################################################################
diff  --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake
index 911f48fa13816c..46a6fdf8728ff8 100644
--- a/compiler-rt/cmake/config-ix.cmake
+++ b/compiler-rt/cmake/config-ix.cmake
@@ -235,9 +235,9 @@ set(COMPILER_RT_SUPPORTED_ARCH)
 # Try to compile a very simple source file to ensure we can target the given
 # platform. We use the results of these tests to build only the various target
 # runtime libraries supported by our current compilers cross-compiling
-# abilities. Avoids using libc as that may not be available yet.
+# abilities.
 set(SIMPLE_SOURCE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/simple.cc)
-file(WRITE ${SIMPLE_SOURCE} "int main(void) { return 0; }\n")
+file(WRITE ${SIMPLE_SOURCE} "#include <stdlib.h>\n#include <stdio.h>\nint main(void) { printf(\"hello, world\"); }\n")
 
 # Detect whether the current target platform is 32-bit or 64-bit, and setup
 # the correct commandline flags needed to attempt to target 32-bit and 64-bit.


        


More information about the llvm-commits mailing list