Skip to content

Commit d2b63ed

Browse files
Revert "Revert "[compiler-rt] Allow building builtins.a without a libc (#86737)""
This reverts commit a2982a2. Buildbot failure that motivated the revert looks unrelated.
1 parent b5b34db commit d2b63ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler-rt/cmake/config-ix.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,9 @@ set(COMPILER_RT_SUPPORTED_ARCH)
235235
# Try to compile a very simple source file to ensure we can target the given
236236
# platform. We use the results of these tests to build only the various target
237237
# runtime libraries supported by our current compilers cross-compiling
238-
# abilities.
238+
# abilities. Avoids using libc as that may not be available yet.
239239
set(SIMPLE_SOURCE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/simple.cc)
240-
file(WRITE ${SIMPLE_SOURCE} "#include <stdlib.h>\n#include <stdio.h>\nint main(void) { printf(\"hello, world\"); }\n")
240+
file(WRITE ${SIMPLE_SOURCE} "int main(void) { return 0; }\n")
241241

242242
# Detect whether the current target platform is 32-bit or 64-bit, and setup
243243
# the correct commandline flags needed to attempt to target 32-bit and 64-bit.

0 commit comments

Comments
 (0)