authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-04-24 14:13:55-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-04-24 14:13:55-04:00
loged419555229a6d93eb7b08950620f86641f44d92
tree52d3131b1efcdf31bf9bcdd90e6ad1382beecb35
parente4a86d4653c5854437371e2b63006bd4a1b4c83d
signaturelock-open Commit is signed but in an unrecognized format.

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 #2348

2 files changed, 2 insertions(+), 0 deletions(-)

CMakeLists.txt+1
......@@ -6701,6 +6701,7 @@ add_custom_command(
67016701 DEPENDS
67026702 "${CMAKE_SOURCE_DIR}/src-self-hosted/stage1.zig"
67036703 "${CMAKE_SOURCE_DIR}/src-self-hosted/translate_c.zig"
6704 "${CMAKE_SOURCE_DIR}/build.zig"
67046705)
67056706add_custom_target(userland_target DEPENDS "${LIBUSERLAND}")
67066707add_executable(zig "${ZIG_MAIN_SRC}")
build.zig+1
......@@ -389,6 +389,7 @@ fn addLibUserlandStep(b: *Builder) void {
389389 else
390390 b.addStaticLibrary("userland", "src-self-hosted/stage1.zig");
391391 artifact.disable_gen_h = true;
392 artifact.setTarget(builtin.arch, builtin.os, builtin.abi);
392393 artifact.linkSystemLibrary("c");
393394 const libuserland_step = b.step("libuserland", "Build the userland compiler library for use in stage1");
394395 libuserland_step.dependOn(&artifact.step);