From e3b8aece4bad8bc0316b24a7570ceb129c450852 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Thu, 10 Apr 2025 16:34:23 +0200 Subject: [PATCH 1/2] Revert "Allocate enough memory when building zig2" This reverts commit 9356cb1475606a7afd2e722af60f87ce2b39f9f8. https://github.com/ziglang/zig/pull/20514#issuecomment-2774509823 --- CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d6c7213b91..2baf4dcbd8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1001,10 +1001,6 @@ if(NOT "${ZIG_TARGET_DYNAMIC_LINKER}" STREQUAL "") list(APPEND ZIG_BUILD_ARGS "-Ddynamic-linker=${ZIG_TARGET_DYNAMIC_LINKER}") endif() -if(MINGW AND "${ZIG_HOST_TARGET_ARCH}" STREQUAL "x86") - list(APPEND ZIG_BUILD_ARGS --maxrss 7000000000) -endif() - add_custom_target(stage3 ALL DEPENDS "${PROJECT_BINARY_DIR}/stage3/bin/zig" From 87f8f47ba508b684d03c13b850cac3fb72efac26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Mon, 2 Jun 2025 20:55:01 +0200 Subject: [PATCH 2/2] std.Build: Demote errors for exceeding max_rss to warnings. We have no control over memory usage on arbitrary systems in the wild. But we would still like to get the warnings so we can adjust the values based on observations in the official ZSF CI. Closes #23254. Closes #23638. --- lib/compiler/build_runner.zig | 1 - lib/std/Build/Step.zig | 1 - 2 files changed, 2 deletions(-) diff --git a/lib/compiler/build_runner.zig b/lib/compiler/build_runner.zig index 2cc3463e66..1a019c80d9 100644 --- a/lib/compiler/build_runner.zig +++ b/lib/compiler/build_runner.zig @@ -599,7 +599,6 @@ fn prepare( if (run.max_rss_is_default) { std.debug.print("note: use --maxrss to override the default", .{}); } - return uncleanExit(); } } } diff --git a/lib/std/Build/Step.zig b/lib/std/Build/Step.zig index 125b3e7947..9cf0ca475e 100644 --- a/lib/std/Build/Step.zig +++ b/lib/std/Build/Step.zig @@ -247,7 +247,6 @@ pub fn make(s: *Step, options: MakeOptions) error{ MakeFailed, MakeSkipped }!voi s.result_peak_rss, s.max_rss, }) catch @panic("OOM"); s.result_error_msgs.append(arena, msg) catch @panic("OOM"); - return error.MakeFailed; } }