Skip to content

[compiler-rt] Allow using a compiler without stdio and printf #95234

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler-rt/cmake/config-ix.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ set(COMPILER_RT_SUPPORTED_ARCH)
# runtime libraries supported by our current compilers cross-compiling
# abilities.
set(SIMPLE_SOURCE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/simple.cc)
file(WRITE ${SIMPLE_SOURCE} "#include <stdlib.h>\n#include <stdio.h>\nint main(void) { printf(\"hello, world\"); }\n")
file(WRITE ${SIMPLE_SOURCE} "#include <stdint.h>\nint main(void) { return 0; }\n")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be fine to leave as is? The builtins set TEST_COMPILE_ONLY which will use:

#include <limits.h>
int foo(int x, int y) { return x + y; }

as the test code rather than this, which is still useful for the non-builtins code in the repository.

Could you share more about how this is problematic when building just the builtins?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, I have a cache with the failure but after nuking the directory I don't get it anymore. It might've been stuck from a previous run and didn't get cleared properly after updating something else. Sorry about that.

After some other hacks I think I've gotten it to at least pass configuring, building only creates files for a few of the floating point values. This seems to be far off the "generic sources" list I see.

extendbfsf2.c.o
truncdfbf2.c.o
truncsfbf2.c.o

I can go ahead and close this since it doesn't seem to be necessary for the parts I'm interested in.


# 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.
Expand Down
Loading