build libuserland in cross compilation mode
Previously libuserland was being built for the native target, which could depend on native CPU features such as AVX. The CI infrastructure is intending to create binaries that are widely compatible and do not make use of specific CPU features. There could be something to gain from enabling native CPU features sometimes, by introducing a new cmake configuration option, but since it's planned to eventually ship self-hosted rather than stage1, I don't think it really matters. closes #2348master
parent
e4a86d4653
commit
ed41955522
|
@ -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}")
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue