From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 36954158010 for ; Wed, 11 Jan 2023 06:04:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4110FE0BD8; Wed, 11 Jan 2023 06:04:49 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2948CE0BD8 for ; Wed, 11 Jan 2023 06:04:49 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 53BCC340D92 for ; Wed, 11 Jan 2023 06:04:48 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E65D6807 for ; Wed, 11 Jan 2023 06:04:46 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1673417078.28fcae31f91eb30b62c8d55b39207238d377f0c2.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/zig/, dev-lang/zig/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/zig/files/zig-0.10.0-build-dir-install-stage3.patch dev-lang/zig/zig-0.10.0.ebuild X-VCS-Directories: dev-lang/zig/files/ dev-lang/zig/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 28fcae31f91eb30b62c8d55b39207238d377f0c2 X-VCS-Branch: master Date: Wed, 11 Jan 2023 06:04:46 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 27c07dd1-e048-462a-9b37-50085b1cbe2e X-Archives-Hash: b54fee205788606d5e7d1f900e53f2fe commit: 28fcae31f91eb30b62c8d55b39207238d377f0c2 Author: Eric Joldasov getgoogleoff me> AuthorDate: Wed Jan 4 11:44:25 2023 +0000 Commit: Sam James gentoo org> CommitDate: Wed Jan 11 06:04:38 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28fcae31 dev-lang/zig: use correct binary for testing 0.10.0 According to upstream [1], 'stage3' binary should be used for testing instead of 'stage2'. Thanks to Frederik Schwan and Sam James for pointing this out! Also split tests so than we can know more accurately what test step failed. [1] https://www.github.com/ziglang/zig/issues/14240#issuecomment-1374634325 Signed-off-by: Eric Joldasov getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/29059 Signed-off-by: Sam James gentoo.org> .../zig-0.10.0-build-dir-install-stage3.patch | 28 ++++++++++++++++++++++ dev-lang/zig/zig-0.10.0.ebuild | 18 +++++++++++++- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/dev-lang/zig/files/zig-0.10.0-build-dir-install-stage3.patch b/dev-lang/zig/files/zig-0.10.0-build-dir-install-stage3.patch new file mode 100644 index 000000000000..c44632f5111e --- /dev/null +++ b/dev-lang/zig/files/zig-0.10.0-build-dir-install-stage3.patch @@ -0,0 +1,28 @@ +From: Eric Joldasov + +Install 'zig' binary in 'build_dir/stage3' directory so that we can find it and use for testing. +Upstream PR https://github.com/ziglang/zig/pull/14255. +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1094,7 +1094,7 @@ set(ZIG_BUILD_ARGS + ) + + add_custom_target(stage3 ALL +- COMMAND zig2 build compile ${ZIG_BUILD_ARGS} ++ COMMAND zig2 build --prefix "${CMAKE_BINARY_DIR}/stage3" ${ZIG_BUILD_ARGS} + DEPENDS zig2 + COMMENT STATUS "Building stage3" + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" +--- a/build.zig ++++ b/build.zig +@@ -148,10 +148,6 @@ pub fn build(b: *Builder) !void { + }; + + const exe = b.addExecutable("zig", main_file); +- +- const compile_step = b.step("compile", "Build the self-hosted compiler"); +- compile_step.dependOn(&exe.step); +- + exe.stack_size = stack_size; + exe.strip = strip; + exe.sanitize_thread = sanitize_thread; diff --git a/dev-lang/zig/zig-0.10.0.ebuild b/dev-lang/zig/zig-0.10.0.ebuild index fbc2bd7aee94..f47f22799167 100644 --- a/dev-lang/zig/zig-0.10.0.ebuild +++ b/dev-lang/zig/zig-0.10.0.ebuild @@ -49,6 +49,7 @@ CHECKREQS_MEMORY="10G" PATCHES=( "${FILESDIR}/${P}-avoid-cmake-bug.patch" + "${FILESDIR}/${P}-build-dir-install-stage3.patch" ) llvm_check_deps() { @@ -75,7 +76,22 @@ src_configure() { src_test() { cd "${BUILD_DIR}" || die - ./zig2 build test -Dstatic-llvm=false -Denable-llvm=true -Dskip-non-native=true || die + local ZIG_TESTARGS=("-Dstatic-llvm=false -Denable-llvm=true -Dskip-non-native=true -Drelease -Dtarget=native") + ./stage3/bin/zig build test-cases ${ZIG_TESTARGS[@]} || die + ./stage3/bin/zig build test-fmt ${ZIG_TESTARGS[@]} || die + ./stage3/bin/zig build test-behavior ${ZIG_TESTARGS[@]} || die + ./stage3/bin/zig build test-compiler-rt ${ZIG_TESTARGS[@]} || die + ./stage3/bin/zig build test-universal-libc ${ZIG_TESTARGS[@]} || die + ./stage3/bin/zig build test-compare-output ${ZIG_TESTARGS[@]} || die + ./stage3/bin/zig build test-standalone ${ZIG_TESTARGS[@]} || die + ./stage3/bin/zig build test-c-abi ${ZIG_TESTARGS[@]} || die + ./stage3/bin/zig build test-link ${ZIG_TESTARGS[@]} || die + ./stage3/bin/zig build test-stack-traces ${ZIG_TESTARGS[@]} || die + ./stage3/bin/zig build test-cli ${ZIG_TESTARGS[@]} || die + ./stage3/bin/zig build test-asm-link ${ZIG_TESTARGS[@]} || die + ./stage3/bin/zig build test-translate-c ${ZIG_TESTARGS[@]} || die + ./stage3/bin/zig build test-run-translated-c ${ZIG_TESTARGS[@]} || die + ./stage3/bin/zig build test-std ${ZIG_TESTARGS[@]} || die } pkg_postinst() {