mirror of
https://github.com/ziglang/zig.git
synced 2026-01-30 03:03:46 +00:00
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.
This commit is contained in:
parent
0741505d6d
commit
75db8d9e2c
@ -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}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user