mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 01:04:43 +01:00
compiler: remove btrfs workaround functionality
has been fixed in the kernel code for a while now
This commit is contained in:
parent
076f7e5bd5
commit
387d550b6c
3 changed files with 2 additions and 22 deletions
|
|
@ -737,7 +737,6 @@ pub const EnvVar = enum {
|
|||
ZIG_BUILD_MULTILINE_ERRORS,
|
||||
ZIG_VERBOSE_LINK,
|
||||
ZIG_VERBOSE_CC,
|
||||
ZIG_BTRFS_WORKAROUND,
|
||||
ZIG_DEBUG_CMD,
|
||||
ZIG_IS_DETECTING_LIBC_PATHS,
|
||||
ZIG_IS_TRYING_TO_NOT_CALL_ITSELF,
|
||||
|
|
|
|||
|
|
@ -129,7 +129,6 @@ pub const JobQueue = struct {
|
|||
/// two hashes of the same package do not match.
|
||||
/// If this is true, `recursive` must be false.
|
||||
debug_hash: bool,
|
||||
work_around_btrfs_bug: bool,
|
||||
mode: Mode,
|
||||
/// Set of hashes that will be additionally fetched even if they are marked
|
||||
/// as lazy.
|
||||
|
|
@ -524,16 +523,7 @@ fn runResource(
|
|||
// Fetch and unpack a resource into a temporary directory.
|
||||
var unpack_result = try unpackResource(f, resource, uri_path, tmp_directory);
|
||||
|
||||
var pkg_path: Cache.Path = .{ .root_dir = tmp_directory, .sub_path = unpack_result.root_dir };
|
||||
|
||||
// Apply btrfs workaround if needed. Reopen tmp_directory.
|
||||
if (native_os == .linux and f.job_queue.work_around_btrfs_bug) {
|
||||
// https://github.com/ziglang/zig/issues/17095
|
||||
pkg_path.root_dir.handle.close(io);
|
||||
pkg_path.root_dir.handle = cache_root.handle.createDirPathOpen(io, tmp_dir_sub_path, .{
|
||||
.open_options = .{ .iterate = true },
|
||||
}) catch @panic("btrfs workaround failed");
|
||||
}
|
||||
const pkg_path: Cache.Path = .{ .root_dir = tmp_directory, .sub_path = unpack_result.root_dir };
|
||||
|
||||
// Load, parse, and validate the unpacked build.zig.zon file. It is allowed
|
||||
// for the file to be missing, in which case this fetched package is
|
||||
|
|
@ -2276,7 +2266,6 @@ const TestFetchBuilder = struct {
|
|||
.recursive = false,
|
||||
.read_only = false,
|
||||
.debug_hash = false,
|
||||
.work_around_btrfs_bug = false,
|
||||
.mode = .needed,
|
||||
};
|
||||
|
||||
|
|
|
|||
10
src/main.zig
10
src/main.zig
|
|
@ -5098,8 +5098,6 @@ fn cmdBuild(gpa: Allocator, arena: Allocator, io: Io, args: []const []const u8,
|
|||
}
|
||||
}
|
||||
|
||||
const work_around_btrfs_bug = native_os == .linux and
|
||||
EnvVar.ZIG_BTRFS_WORKAROUND.isSet(environ_map);
|
||||
const root_prog_node = std.Progress.start(io, .{
|
||||
.disable_printing = (color == .off),
|
||||
.root_name = "Compile Build Script",
|
||||
|
|
@ -5244,7 +5242,6 @@ fn cmdBuild(gpa: Allocator, arena: Allocator, io: Io, args: []const []const u8,
|
|||
.read_only = false,
|
||||
.recursive = true,
|
||||
.debug_hash = false,
|
||||
.work_around_btrfs_bug = work_around_btrfs_bug,
|
||||
.unlazy_set = unlazy_set,
|
||||
.mode = fetch_mode,
|
||||
};
|
||||
|
|
@ -5254,9 +5251,7 @@ fn cmdBuild(gpa: Allocator, arena: Allocator, io: Io, args: []const []const u8,
|
|||
job_queue.global_cache = .{
|
||||
.path = p,
|
||||
.handle = Io.Dir.cwd().openDir(io, p, .{}) catch |err| {
|
||||
fatal("unable to open system package directory '{s}': {s}", .{
|
||||
p, @errorName(err),
|
||||
});
|
||||
fatal("unable to open system package directory '{s}': {t}", .{ p, err });
|
||||
},
|
||||
};
|
||||
job_queue.read_only = true;
|
||||
|
|
@ -6938,8 +6933,6 @@ fn cmdFetch(
|
|||
dev.check(.fetch_command);
|
||||
|
||||
const color: Color = .auto;
|
||||
const work_around_btrfs_bug = native_os == .linux and
|
||||
EnvVar.ZIG_BTRFS_WORKAROUND.isSet(environ_map);
|
||||
var opt_path_or_url: ?[]const u8 = null;
|
||||
var override_global_cache_dir: ?[]const u8 = EnvVar.ZIG_GLOBAL_CACHE_DIR.get(environ_map);
|
||||
var debug_hash: bool = false;
|
||||
|
|
@ -7010,7 +7003,6 @@ fn cmdFetch(
|
|||
.recursive = false,
|
||||
.read_only = false,
|
||||
.debug_hash = debug_hash,
|
||||
.work_around_btrfs_bug = work_around_btrfs_bug,
|
||||
.mode = .all,
|
||||
};
|
||||
defer job_queue.deinit();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue