Adding 0.14.1. Note that this version fails to build on x86_64 for whatever reason idk OBS-URL: https://build.opensuse.org/request/show/1306134 OBS-URL: https://build.opensuse.org/package/show/devel:languages:zig/zig0.14?expand=0&rev=1
34 lines
1.2 KiB
Diff
34 lines
1.2 KiB
Diff
Date: 2025-01-31
|
|
Based on https://github.com/ziglang/zig/pull/22673
|
|
to fix variations of binaries from CPU-model https://github.com/ziglang/zig/issues/22663
|
|
|
|
|
|
Index: zig-0.14.0/lib/compiler/build_runner.zig
|
|
===================================================================
|
|
--- zig-0.14.0.orig/lib/compiler/build_runner.zig
|
|
+++ zig-0.14.0/lib/compiler/build_runner.zig
|
|
@@ -66,6 +66,12 @@ pub fn main() !void {
|
|
.handle = try std.fs.cwd().makeOpenPath(global_cache_root, .{}),
|
|
};
|
|
|
|
+ // Avoid using native binaries during build to not influence zig-cache hashes
|
|
+ const host_query: std.Target.Query = .{
|
|
+ .cpu_model = .baseline,
|
|
+ .os_tag = builtin.target.os.tag,
|
|
+ };
|
|
+
|
|
var graph: std.Build.Graph = .{
|
|
.arena = arena,
|
|
.cache = .{
|
|
@@ -77,8 +83,8 @@ pub fn main() !void {
|
|
.global_cache_root = global_cache_directory,
|
|
.zig_lib_directory = zig_lib_directory,
|
|
.host = .{
|
|
- .query = .{},
|
|
- .result = try std.zig.system.resolveTargetQuery(.{}),
|
|
+ .query = host_query,
|
|
+ .result = try std.zig.system.resolveTargetQuery(host_query),
|
|
},
|
|
};
|
|
|