diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f6ee5a852..41aa75def2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6701,6 +6701,7 @@ add_custom_command( DEPENDS "${CMAKE_SOURCE_DIR}/src-self-hosted/stage1.zig" "${CMAKE_SOURCE_DIR}/src-self-hosted/translate_c.zig" + "${CMAKE_SOURCE_DIR}/build.zig" ) add_custom_target(userland_target DEPENDS "${LIBUSERLAND}") add_executable(zig "${ZIG_MAIN_SRC}") diff --git a/build.zig b/build.zig index 733f2e68d2..d9456e0d28 100644 --- a/build.zig +++ b/build.zig @@ -389,6 +389,7 @@ fn addLibUserlandStep(b: *Builder) void { else b.addStaticLibrary("userland", "src-self-hosted/stage1.zig"); artifact.disable_gen_h = true; + artifact.setTarget(builtin.arch, builtin.os, builtin.abi); artifact.linkSystemLibrary("c"); const libuserland_step = b.step("libuserland", "Build the userland compiler library for use in stage1"); libuserland_step.dependOn(&artifact.step);