diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e74b6f17b313a6c4bef52610f2d49b33ecda978..837a5bcd1b8de6225797bdb92031b306fdd7bf92 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -690,7 +690,7 @@ add_custom_command( set(BUILD_COMPILER_RT_ARGS "${PROJECT_SOURCE_DIR}/lib" - build-obj -ofmt=c -OReleaseSmall + build-obj -ofmt=c -lc -OReleaseSmall --name compiler_rt -femit-bin="${ZIG_COMPILER_RT_C_SOURCE}" -target "${ZIG_HOST_TARGET_TRIPLE}" diff --git a/bootstrap.c b/bootstrap.c index f0cdc8e0a2e2cb418ea0029cbb0a4aaae6c258be..4e41d2ebdc8a0839182901b33e6214ad3f6ae3f4 100644 --- a/bootstrap.c +++ b/bootstrap.c @@ -212,7 +212,7 @@ int main(int argc, char **argv) { { const char *child_argv[] = { "./zig1", "lib", "build-obj", - "-ofmt=c", "-OReleaseSmall", + "-ofmt=c", "-lc", "-OReleaseSmall", "--name", "compiler_rt", "-femit-bin=compiler_rt.c", "-target", host_triple, "-Mroot=lib/compiler_rt.zig",