From 75db8d9e2cdf0d0dff2f287cce30f1b727dc2d54 Mon Sep 17 00:00:00 2001 From: Timon Kruiper Date: Mon, 5 Oct 2020 21:08:42 +0200 Subject: 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. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e52f83f1b..c749620654 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -493,7 +493,7 @@ if("${ZIG_TARGET_TRIPLE}" STREQUAL "native") endif() else() add_custom_target(zig_build_zig1 ALL - COMMAND "${ZIG_EXECUTABLE}" ${BUILD_ZIG1_ARGS} + COMMAND "${ZIG_EXECUTABLE}" "build-obj" ${BUILD_ZIG1_ARGS} BYPRODUCTS "${ZIG1_OBJECT}" COMMENT STATUS "Building self-hosted component ${ZIG1_OBJECT}" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" -- cgit v1.2.3