mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
Upgrade zig to 0.12.0-dev.888+130227491 (#6471)
* update build.zig * save * works? * better workaround * fix install * Fix compiler crash
This commit is contained in:
25
build.zig
25
build.zig
@@ -1,3 +1,5 @@
|
||||
const required_zig_version = "0.12.0-dev.888+130227491";
|
||||
|
||||
const std = @import("std");
|
||||
const pathRel = std.fs.path.relative;
|
||||
const Wyhash = @import("./src/wyhash.zig").Wyhash;
|
||||
@@ -145,7 +147,6 @@ pub fn build(b: *Build) !void {
|
||||
};
|
||||
}
|
||||
|
||||
const required_zig_version = "0.12.0-dev.163+6780a6bbf";
|
||||
pub fn build_(b: *Build) !void {
|
||||
if (!std.mem.eql(u8, @import("builtin").zig_version_string, required_zig_version)) {
|
||||
const colors = std.io.getStdErr().supportsAnsiEscapeCodes();
|
||||
@@ -232,7 +233,7 @@ pub fn build_(b: *Build) !void {
|
||||
.root_source_file = FileSource.relative(root_src),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.main_pkg_path = .{ .cwd_relative = b.pathFromRoot(".") },
|
||||
.main_mod_path = .{ .cwd_relative = b.pathFromRoot(".") },
|
||||
});
|
||||
|
||||
b.reference_trace = 16;
|
||||
@@ -346,7 +347,7 @@ pub fn build_(b: *Build) !void {
|
||||
.root_source_file = FileSource.relative("src/bindgen.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.main_pkg_path = obj.main_pkg_path,
|
||||
.main_mod_path = obj.main_mod_path,
|
||||
});
|
||||
defer headers_step.dependOn(&headers_obj.step);
|
||||
try configureObjectStep(b, headers_obj, headers_step, @TypeOf(target), target);
|
||||
@@ -363,7 +364,7 @@ pub fn build_(b: *Build) !void {
|
||||
.root_source_file = FileSource.relative("root_wasm.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.main_pkg_path = obj.main_pkg_path,
|
||||
.main_mod_path = obj.main_mod_path,
|
||||
});
|
||||
defer wasm_step.dependOn(&wasm.step);
|
||||
wasm.strip = false;
|
||||
@@ -382,7 +383,7 @@ pub fn build_(b: *Build) !void {
|
||||
.root_source_file = FileSource.relative("misctools/http_bench.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.main_pkg_path = obj.main_pkg_path,
|
||||
.main_mod_path = obj.main_mod_path,
|
||||
});
|
||||
defer headers_step.dependOn(&headers_obj.step);
|
||||
try configureObjectStep(b, headers_obj, headers_step, @TypeOf(target), target);
|
||||
@@ -396,7 +397,7 @@ pub fn build_(b: *Build) !void {
|
||||
.root_source_file = FileSource.relative("misctools/machbench.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.main_pkg_path = obj.main_pkg_path,
|
||||
.main_mod_path = obj.main_mod_path,
|
||||
});
|
||||
defer headers_step.dependOn(&headers_obj.step);
|
||||
try configureObjectStep(b, headers_obj, headers_step, @TypeOf(target), target);
|
||||
@@ -410,7 +411,7 @@ pub fn build_(b: *Build) !void {
|
||||
.root_source_file = FileSource.relative("misctools/fetch.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.main_pkg_path = obj.main_pkg_path,
|
||||
.main_mod_path = obj.main_mod_path,
|
||||
});
|
||||
defer headers_step.dependOn(&headers_obj.step);
|
||||
try configureObjectStep(b, headers_obj, headers_step, @TypeOf(target), target);
|
||||
@@ -424,7 +425,7 @@ pub fn build_(b: *Build) !void {
|
||||
.root_source_file = FileSource.relative("src/bench/string-handling.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.main_pkg_path = obj.main_pkg_path,
|
||||
.main_mod_path = obj.main_mod_path,
|
||||
});
|
||||
defer headers_step.dependOn(&headers_obj.step);
|
||||
try configureObjectStep(b, headers_obj, headers_step, @TypeOf(target), target);
|
||||
@@ -438,7 +439,7 @@ pub fn build_(b: *Build) !void {
|
||||
.root_source_file = FileSource.relative("src/sha.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.main_pkg_path = obj.main_pkg_path,
|
||||
.main_mod_path = obj.main_mod_path,
|
||||
});
|
||||
defer headers_step.dependOn(&headers_obj.step);
|
||||
try configureObjectStep(b, headers_obj, headers_step, @TypeOf(target), target);
|
||||
@@ -452,7 +453,7 @@ pub fn build_(b: *Build) !void {
|
||||
.root_source_file = FileSource.relative("src/sourcemap/vlq_bench.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.main_pkg_path = obj.main_pkg_path,
|
||||
.main_mod_path = obj.main_mod_path,
|
||||
});
|
||||
defer headers_step.dependOn(&headers_obj.step);
|
||||
try configureObjectStep(b, headers_obj, headers_step, @TypeOf(target), target);
|
||||
@@ -466,7 +467,7 @@ pub fn build_(b: *Build) !void {
|
||||
.root_source_file = FileSource.relative("misctools/tgz.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.main_pkg_path = obj.main_pkg_path,
|
||||
.main_mod_path = obj.main_mod_path,
|
||||
});
|
||||
defer headers_step.dependOn(&headers_obj.step);
|
||||
try configureObjectStep(b, headers_obj, headers_step, @TypeOf(target), target);
|
||||
@@ -483,7 +484,7 @@ pub fn build_(b: *Build) !void {
|
||||
var headers_obj: *CompileStep = b.addTest(.{
|
||||
.root_source_file = FileSource.relative(test_file orelse "src/main.zig"),
|
||||
.target = target,
|
||||
.main_pkg_path = obj.main_pkg_path,
|
||||
.main_mod_path = obj.main_mod_path,
|
||||
});
|
||||
headers_obj.filter = test_filter;
|
||||
if (test_bin_) |test_bin| {
|
||||
|
||||
Reference in New Issue
Block a user