mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +00:00
commit
68bb394570
@ -601,8 +601,7 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
add_custom_target(zig_build_libuserland ALL
|
add_custom_target(zig_build_libuserland ALL
|
||||||
COMMAND zig0 build
|
COMMAND zig0 build
|
||||||
--override-std-dir std
|
--override-lib-dir "${CMAKE_SOURCE_DIR}/lib"
|
||||||
--override-lib-dir "${CMAKE_SOURCE_DIR}"
|
|
||||||
libuserland install
|
libuserland install
|
||||||
"-Doutput-dir=${CMAKE_BINARY_DIR}"
|
"-Doutput-dir=${CMAKE_BINARY_DIR}"
|
||||||
"-Drelease=${LIBUSERLAND_RELEASE_MODE}"
|
"-Drelease=${LIBUSERLAND_RELEASE_MODE}"
|
||||||
|
|||||||
@ -87,11 +87,6 @@ pub fn build(b: *Builder) !void {
|
|||||||
.source_dir = "lib",
|
.source_dir = "lib",
|
||||||
.install_dir = .Lib,
|
.install_dir = .Lib,
|
||||||
.install_subdir = "zig",
|
.install_subdir = "zig",
|
||||||
});
|
|
||||||
b.installDirectory(InstallDirectoryOptions{
|
|
||||||
.source_dir = "std",
|
|
||||||
.install_dir = .Lib,
|
|
||||||
.install_subdir = "zig" ++ fs.path.sep_str ++ "std",
|
|
||||||
.exclude_extensions = [_][]const u8{ "test.zig", "README.md" },
|
.exclude_extensions = [_][]const u8{ "test.zig", "README.md" },
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -134,9 +129,9 @@ pub fn build(b: *Builder) !void {
|
|||||||
|
|
||||||
test_step.dependOn(tests.addPkgTests(b, test_filter, "test/stage1/behavior.zig", "behavior", "Run the behavior tests", modes, false, skip_non_native, skip_libc, is_wine_enabled, is_qemu_enabled, glibc_multi_dir));
|
test_step.dependOn(tests.addPkgTests(b, test_filter, "test/stage1/behavior.zig", "behavior", "Run the behavior tests", modes, false, skip_non_native, skip_libc, is_wine_enabled, is_qemu_enabled, glibc_multi_dir));
|
||||||
|
|
||||||
test_step.dependOn(tests.addPkgTests(b, test_filter, "std/std.zig", "std", "Run the standard library tests", modes, false, skip_non_native, skip_libc, is_wine_enabled, is_qemu_enabled, glibc_multi_dir));
|
test_step.dependOn(tests.addPkgTests(b, test_filter, "lib/std/std.zig", "std", "Run the standard library tests", modes, false, skip_non_native, skip_libc, is_wine_enabled, is_qemu_enabled, glibc_multi_dir));
|
||||||
|
|
||||||
test_step.dependOn(tests.addPkgTests(b, test_filter, "std/special/compiler_rt.zig", "compiler-rt", "Run the compiler_rt tests", modes, true, skip_non_native, true, is_wine_enabled, is_qemu_enabled, glibc_multi_dir));
|
test_step.dependOn(tests.addPkgTests(b, test_filter, "lib/std/special/compiler_rt.zig", "compiler-rt", "Run the compiler_rt tests", modes, true, skip_non_native, true, is_wine_enabled, is_qemu_enabled, glibc_multi_dir));
|
||||||
|
|
||||||
test_step.dependOn(tests.addCompareOutputTests(b, test_filter, modes));
|
test_step.dependOn(tests.addCompareOutputTests(b, test_filter, modes));
|
||||||
test_step.dependOn(tests.addStandaloneTests(b, test_filter, modes));
|
test_step.dependOn(tests.addStandaloneTests(b, test_filter, modes));
|
||||||
|
|||||||
@ -52,7 +52,6 @@ pub const Builder = struct {
|
|||||||
cache_root: []const u8,
|
cache_root: []const u8,
|
||||||
release_mode: ?builtin.Mode,
|
release_mode: ?builtin.Mode,
|
||||||
is_release: bool,
|
is_release: bool,
|
||||||
override_std_dir: ?[]const u8,
|
|
||||||
override_lib_dir: ?[]const u8,
|
override_lib_dir: ?[]const u8,
|
||||||
|
|
||||||
pkg_config_pkg_list: ?(PkgConfigError![]const PkgConfigPkg) = null,
|
pkg_config_pkg_list: ?(PkgConfigError![]const PkgConfigPkg) = null,
|
||||||
@ -158,7 +157,6 @@ pub const Builder = struct {
|
|||||||
},
|
},
|
||||||
.release_mode = null,
|
.release_mode = null,
|
||||||
.is_release = false,
|
.is_release = false,
|
||||||
.override_std_dir = null,
|
|
||||||
.override_lib_dir = null,
|
.override_lib_dir = null,
|
||||||
.install_path = undefined,
|
.install_path = undefined,
|
||||||
};
|
};
|
||||||
@ -1439,7 +1437,6 @@ pub const LibExeObjStep = struct {
|
|||||||
bundle_compiler_rt: bool,
|
bundle_compiler_rt: bool,
|
||||||
disable_stack_probing: bool,
|
disable_stack_probing: bool,
|
||||||
c_std: Builder.CStd,
|
c_std: Builder.CStd,
|
||||||
override_std_dir: ?[]const u8,
|
|
||||||
override_lib_dir: ?[]const u8,
|
override_lib_dir: ?[]const u8,
|
||||||
main_pkg_path: ?[]const u8,
|
main_pkg_path: ?[]const u8,
|
||||||
exec_cmd_args: ?[]const ?[]const u8,
|
exec_cmd_args: ?[]const ?[]const u8,
|
||||||
@ -1570,7 +1567,6 @@ pub const LibExeObjStep = struct {
|
|||||||
.build_options_contents = std.Buffer.initSize(builder.allocator, 0) catch unreachable,
|
.build_options_contents = std.Buffer.initSize(builder.allocator, 0) catch unreachable,
|
||||||
.c_std = Builder.CStd.C99,
|
.c_std = Builder.CStd.C99,
|
||||||
.system_linker_hack = false,
|
.system_linker_hack = false,
|
||||||
.override_std_dir = null,
|
|
||||||
.override_lib_dir = null,
|
.override_lib_dir = null,
|
||||||
.main_pkg_path = null,
|
.main_pkg_path = null,
|
||||||
.exec_cmd_args = null,
|
.exec_cmd_args = null,
|
||||||
@ -1883,8 +1879,8 @@ pub const LibExeObjStep = struct {
|
|||||||
self.build_mode = mode;
|
self.build_mode = mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn overrideStdDir(self: *LibExeObjStep, dir_path: []const u8) void {
|
pub fn overrideZigLibDir(self: *LibExeObjStep, dir_path: []const u8) void {
|
||||||
self.override_std_dir = dir_path;
|
self.override_lib_dir = self.builder.dupe(dir_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn setMainPkgPath(self: *LibExeObjStep, dir_path: []const u8) void {
|
pub fn setMainPkgPath(self: *LibExeObjStep, dir_path: []const u8) void {
|
||||||
@ -2300,14 +2296,6 @@ pub const LibExeObjStep = struct {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self.override_std_dir) |dir| {
|
|
||||||
try zig_args.append("--override-std-dir");
|
|
||||||
try zig_args.append(builder.pathFromRoot(dir));
|
|
||||||
} else if (self.builder.override_std_dir) |dir| {
|
|
||||||
try zig_args.append("--override-std-dir");
|
|
||||||
try zig_args.append(builder.pathFromRoot(dir));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (self.override_lib_dir) |dir| {
|
if (self.override_lib_dir) |dir| {
|
||||||
try zig_args.append("--override-lib-dir");
|
try zig_args.append("--override-lib-dir");
|
||||||
try zig_args.append(builder.pathFromRoot(dir));
|
try zig_args.append(builder.pathFromRoot(dir));
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user