Merge pull request #3315 from ziglang/mv-std-lib

Move std/ to lib/std/
This commit is contained in:
Andrew Kelley
2019-09-26 01:54:45 -04:00
committed by GitHub
378 changed files with 42 additions and 83 deletions
+1 -2
View File
@@ -601,8 +601,7 @@ else()
endif()
add_custom_target(zig_build_libuserland ALL
COMMAND zig0 build
--override-std-dir std
--override-lib-dir "${CMAKE_SOURCE_DIR}"
--override-lib-dir "${CMAKE_SOURCE_DIR}/lib"
libuserland install
"-Doutput-dir=${CMAKE_BINARY_DIR}"
"-Drelease=${LIBUSERLAND_RELEASE_MODE}"
+2 -7
View File
@@ -87,11 +87,6 @@ pub fn build(b: *Builder) !void {
.source_dir = "lib",
.install_dir = .Lib,
.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" },
});
@@ -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, "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.addStandaloneTests(b, test_filter, modes));
View File
+2 -14
View File
@@ -52,7 +52,6 @@ pub const Builder = struct {
cache_root: []const u8,
release_mode: ?builtin.Mode,
is_release: bool,
override_std_dir: ?[]const u8,
override_lib_dir: ?[]const u8,
pkg_config_pkg_list: ?(PkgConfigError![]const PkgConfigPkg) = null,
@@ -158,7 +157,6 @@ pub const Builder = struct {
},
.release_mode = null,
.is_release = false,
.override_std_dir = null,
.override_lib_dir = null,
.install_path = undefined,
};
@@ -1439,7 +1437,6 @@ pub const LibExeObjStep = struct {
bundle_compiler_rt: bool,
disable_stack_probing: bool,
c_std: Builder.CStd,
override_std_dir: ?[]const u8,
override_lib_dir: ?[]const u8,
main_pkg_path: ?[]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,
.c_std = Builder.CStd.C99,
.system_linker_hack = false,
.override_std_dir = null,
.override_lib_dir = null,
.main_pkg_path = null,
.exec_cmd_args = null,
@@ -1883,8 +1879,8 @@ pub const LibExeObjStep = struct {
self.build_mode = mode;
}
pub fn overrideStdDir(self: *LibExeObjStep, dir_path: []const u8) void {
self.override_std_dir = dir_path;
pub fn overrideZigLibDir(self: *LibExeObjStep, dir_path: []const u8) void {
self.override_lib_dir = self.builder.dupe(dir_path);
}
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| {
try zig_args.append("--override-lib-dir");
try zig_args.append(builder.pathFromRoot(dir));
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File

Some files were not shown because too many files have changed in this diff Show More