authorgravatar for timonkruiper@gmail.comTimon Kruiper <timonkruiper@gmail.com> 2020-10-05 21:08:42+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-10-05 22:18:42-04:00
log75db8d9e2cdf0d0dff2f287cce30f1b727dc2d54
treebe04e1dfd2aa73ce986f02f8bdc95200b86048f4
parent0741505d6d4aae509160aaef9100ef1857241ef5

Fix cross-compiling the zig compiler

zig0 is only used for building objects, thus it has no options like `build-exe/obj`. But when cross-compiling, we have a working zig compiler on the host, thus we need to pass `build-obj` to the zig compiler.

1 files changed, 1 insertions(+), 1 deletions(-)

CMakeLists.txt+1-1
...@@ -493,7 +493,7 @@ if("${ZIG_TARGET_TRIPLE}" STREQUAL "native")...@@ -493,7 +493,7 @@ if("${ZIG_TARGET_TRIPLE}" STREQUAL "native")
493 endif()493 endif()
494else()494else()
495 add_custom_target(zig_build_zig1 ALL495 add_custom_target(zig_build_zig1 ALL
496 COMMAND "${ZIG_EXECUTABLE}" ${BUILD_ZIG1_ARGS}496 COMMAND "${ZIG_EXECUTABLE}" "build-obj" ${BUILD_ZIG1_ARGS}
497 BYPRODUCTS "${ZIG1_OBJECT}"497 BYPRODUCTS "${ZIG1_OBJECT}"
498 COMMENT STATUS "Building self-hosted component ${ZIG1_OBJECT}"498 COMMENT STATUS "Building self-hosted component ${ZIG1_OBJECT}"
499 WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"499 WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"