mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
zig: update to 0.10.1
This commit is contained in:
parent
8abcaebddb
commit
d361bbd1ce
2 changed files with 6 additions and 52 deletions
|
@ -1,48 +0,0 @@
|
||||||
From 1e8cdace7ad324a42228aeb5cd6eb8dd15429413 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Isaac Freund <ifreund@ifreund.xyz>
|
|
||||||
Date: Tue, 21 Sep 2021 21:06:10 +0200
|
|
||||||
Subject: [PATCH] std.build: fix handling of -Dcpu
|
|
||||||
|
|
||||||
Currently -Dcpu is completely ignored if -Dtarget isn't passed as well.
|
|
||||||
Further, -Dcpu=baseline is ignored even if -Dtarget=native is passed.
|
|
||||||
|
|
||||||
This patch fixes these 2 issues, always respecting the -Dcpu option if
|
|
||||||
present.
|
|
||||||
---
|
|
||||||
lib/std/build.zig | 13 +++++++------
|
|
||||||
1 file changed, 7 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/lib/std/build.zig b/lib/std/build.zig
|
|
||||||
index 9b7ebb1f4..e398529f9 100644
|
|
||||||
--- a/lib/std/build.zig
|
|
||||||
+++ b/lib/std/build.zig
|
|
||||||
@@ -685,7 +685,11 @@ pub const Builder = struct {
|
|
||||||
);
|
|
||||||
const mcpu = self.option([]const u8, "cpu", "Target CPU");
|
|
||||||
|
|
||||||
- const triple = maybe_triple orelse return args.default_target;
|
|
||||||
+ if (maybe_triple == null and mcpu == null) {
|
|
||||||
+ return args.default_target;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ const triple = maybe_triple orelse "native";
|
|
||||||
|
|
||||||
var diags: CrossTarget.ParseOptions.Diagnostics = .{};
|
|
||||||
const selected_target = CrossTarget.parse(.{
|
|
||||||
@@ -2451,11 +2455,8 @@ pub const LibExeObjStep = struct {
|
|
||||||
|
|
||||||
if (populated_cpu_features.eql(cross.cpu.features)) {
|
|
||||||
// The CPU name alone is sufficient.
|
|
||||||
- // If it is the baseline CPU, no command line args are required.
|
|
||||||
- if (cross.cpu.model != std.Target.Cpu.baseline(cross.cpu.arch).model) {
|
|
||||||
- try zig_args.append("-mcpu");
|
|
||||||
- try zig_args.append(cross.cpu.model.name);
|
|
||||||
- }
|
|
||||||
+ try zig_args.append("-mcpu");
|
|
||||||
+ try zig_args.append(cross.cpu.model.name);
|
|
||||||
} else {
|
|
||||||
var mcpu_buffer = std.ArrayList(u8).init(builder.allocator);
|
|
||||||
|
|
||||||
--
|
|
||||||
2.33.1
|
|
||||||
|
|
|
@ -1,17 +1,19 @@
|
||||||
# Template file for 'zig'
|
# Template file for 'zig'
|
||||||
pkgname=zig
|
pkgname=zig
|
||||||
version=0.8.1
|
version=0.10.1
|
||||||
revision=2
|
revision=1
|
||||||
archs="x86_64* aarch64*"
|
archs="x86_64* aarch64*"
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
make_cmd=make
|
make_cmd=make
|
||||||
makedepends="clang llvm12 lld-devel"
|
# we add xml2, zstd, zlib and ncurses
|
||||||
|
# because our lld is static-only and requires those to work
|
||||||
|
makedepends="clang llvm15 lld-devel libxml2-devel libzstd-devel ncurses-devel zlib-devel"
|
||||||
short_desc="Programming language designed for robustness, optimality, and clarity"
|
short_desc="Programming language designed for robustness, optimality, and clarity"
|
||||||
maintainer="Isaac Freund <mail@isaacfreund.com>"
|
maintainer="Isaac Freund <mail@isaacfreund.com>"
|
||||||
license="MIT"
|
license="MIT"
|
||||||
homepage="https://ziglang.org"
|
homepage="https://ziglang.org"
|
||||||
distfiles="https://ziglang.org/download/${version}/zig-${version}.tar.xz"
|
distfiles="https://ziglang.org/download/${version}/zig-${version}.tar.xz"
|
||||||
checksum=8c428e14a0a89cb7a15a6768424a37442292858cdb695e2eb503fa3c7bf47f1a
|
checksum=69459bc804333df077d441ef052ffa143d53012b655a51f04cfef1414c04168c
|
||||||
nopie=yes
|
nopie=yes
|
||||||
nocross=yes
|
nocross=yes
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue