mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
Compare commits
1 commit
47bb210317
...
a17657f881
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a17657f881 |
25 changed files with 29 additions and 279 deletions
182
build.zig
182
build.zig
|
|
@ -91,8 +91,6 @@ pub fn build(b: *std.Build) !void {
|
|||
const skip_libc = b.option(bool, "skip-libc", "Main test suite skips tests that link libc") orelse false;
|
||||
const skip_single_threaded = b.option(bool, "skip-single-threaded", "Main test suite skips tests that are single-threaded") orelse false;
|
||||
const skip_compile_errors = b.option(bool, "skip-compile-errors", "Main test suite skips compile error tests") orelse false;
|
||||
const skip_spirv = b.option(bool, "skip-spirv", "Main test suite skips targets with spirv32/spirv64 architecture") orelse false;
|
||||
const skip_wasm = b.option(bool, "skip-wasm", "Main test suite skips targets with wasm32/wasm64 architecture") orelse false;
|
||||
const skip_freebsd = b.option(bool, "skip-freebsd", "Main test suite skips targets with freebsd OS") orelse false;
|
||||
const skip_netbsd = b.option(bool, "skip-netbsd", "Main test suite skips targets with netbsd OS") orelse false;
|
||||
const skip_windows = b.option(bool, "skip-windows", "Main test suite skips targets with windows OS") orelse false;
|
||||
|
|
@ -423,8 +421,6 @@ pub fn build(b: *std.Build) !void {
|
|||
.test_target_filters = test_target_filters,
|
||||
.skip_compile_errors = skip_compile_errors,
|
||||
.skip_non_native = skip_non_native,
|
||||
.skip_spirv = skip_spirv,
|
||||
.skip_wasm = skip_wasm,
|
||||
.skip_freebsd = skip_freebsd,
|
||||
.skip_netbsd = skip_netbsd,
|
||||
.skip_windows = skip_windows,
|
||||
|
|
@ -456,8 +452,6 @@ pub fn build(b: *std.Build) !void {
|
|||
.skip_single_threaded = skip_single_threaded,
|
||||
.skip_non_native = skip_non_native,
|
||||
.test_default_only = no_matrix,
|
||||
.skip_spirv = skip_spirv,
|
||||
.skip_wasm = skip_wasm,
|
||||
.skip_freebsd = skip_freebsd,
|
||||
.skip_netbsd = skip_netbsd,
|
||||
.skip_windows = skip_windows,
|
||||
|
|
@ -465,29 +459,8 @@ pub fn build(b: *std.Build) !void {
|
|||
.skip_linux = skip_linux,
|
||||
.skip_llvm = skip_llvm,
|
||||
.skip_libc = skip_libc,
|
||||
.max_rss = switch (b.graph.host.result.os.tag) {
|
||||
.freebsd => switch (b.graph.host.result.cpu.arch) {
|
||||
.x86_64 => 1_060_217_241,
|
||||
else => 1_100_000_000,
|
||||
},
|
||||
.linux => switch (b.graph.host.result.cpu.arch) {
|
||||
.aarch64 => 659_809_075,
|
||||
.loongarch64 => 598_902_374,
|
||||
.riscv64 => 731_258_880,
|
||||
.s390x => 580_596_121,
|
||||
.x86_64 => 3_290_894_745,
|
||||
else => 3_300_000_000,
|
||||
},
|
||||
.macos => switch (b.graph.host.result.cpu.arch) {
|
||||
.aarch64 => 767_736_217,
|
||||
else => 800_000_000,
|
||||
},
|
||||
.windows => switch (b.graph.host.result.cpu.arch) {
|
||||
.x86_64 => 603_070_054,
|
||||
else => 700_000_000,
|
||||
},
|
||||
else => 3_300_000_000,
|
||||
},
|
||||
// 3888779264 was observed on an x86_64-linux-gnu host.
|
||||
.max_rss = 4000000000,
|
||||
}));
|
||||
|
||||
test_modules_step.dependOn(tests.addModuleTests(b, .{
|
||||
|
|
@ -502,8 +475,6 @@ pub fn build(b: *std.Build) !void {
|
|||
.skip_single_threaded = true,
|
||||
.skip_non_native = skip_non_native,
|
||||
.test_default_only = no_matrix,
|
||||
.skip_spirv = skip_spirv,
|
||||
.skip_wasm = skip_wasm,
|
||||
.skip_freebsd = skip_freebsd,
|
||||
.skip_netbsd = skip_netbsd,
|
||||
.skip_windows = skip_windows,
|
||||
|
|
@ -512,29 +483,6 @@ pub fn build(b: *std.Build) !void {
|
|||
.skip_llvm = skip_llvm,
|
||||
.skip_libc = true,
|
||||
.no_builtin = true,
|
||||
.max_rss = switch (b.graph.host.result.os.tag) {
|
||||
.freebsd => switch (b.graph.host.result.cpu.arch) {
|
||||
.x86_64 => 743_802_470,
|
||||
else => 800_000_000,
|
||||
},
|
||||
.linux => switch (b.graph.host.result.cpu.arch) {
|
||||
.aarch64 => 639_565_414,
|
||||
.loongarch64 => 598_884_352,
|
||||
.riscv64 => 636_429_516,
|
||||
.s390x => 574_166_630,
|
||||
.x86_64 => 764_861_644,
|
||||
else => 800_000_000,
|
||||
},
|
||||
.macos => switch (b.graph.host.result.cpu.arch) {
|
||||
.aarch64 => 701_413_785,
|
||||
else => 800_000_000,
|
||||
},
|
||||
.windows => switch (b.graph.host.result.cpu.arch) {
|
||||
.x86_64 => 536_414_208,
|
||||
else => 600_000_000,
|
||||
},
|
||||
else => 800_000_000,
|
||||
},
|
||||
}));
|
||||
|
||||
test_modules_step.dependOn(tests.addModuleTests(b, .{
|
||||
|
|
@ -549,8 +497,6 @@ pub fn build(b: *std.Build) !void {
|
|||
.skip_single_threaded = true,
|
||||
.skip_non_native = skip_non_native,
|
||||
.test_default_only = no_matrix,
|
||||
.skip_spirv = skip_spirv,
|
||||
.skip_wasm = skip_wasm,
|
||||
.skip_freebsd = skip_freebsd,
|
||||
.skip_netbsd = skip_netbsd,
|
||||
.skip_windows = skip_windows,
|
||||
|
|
@ -559,29 +505,6 @@ pub fn build(b: *std.Build) !void {
|
|||
.skip_llvm = skip_llvm,
|
||||
.skip_libc = true,
|
||||
.no_builtin = true,
|
||||
.max_rss = switch (b.graph.host.result.os.tag) {
|
||||
.freebsd => switch (b.graph.host.result.cpu.arch) {
|
||||
.x86_64 => 557_892_403,
|
||||
else => 600_000_000,
|
||||
},
|
||||
.linux => switch (b.graph.host.result.cpu.arch) {
|
||||
.aarch64 => 615_302_758,
|
||||
.loongarch64 => 598_974_464,
|
||||
.riscv64 => 382_786_764,
|
||||
.s390x => 395_555_635,
|
||||
.x86_64 => 692_348_518,
|
||||
else => 700_000_000,
|
||||
},
|
||||
.macos => switch (b.graph.host.result.cpu.arch) {
|
||||
.aarch64 => 451_389_030,
|
||||
else => 500_000_000,
|
||||
},
|
||||
.windows => switch (b.graph.host.result.cpu.arch) {
|
||||
.x86_64 => 367_747_072,
|
||||
else => 400_000_000,
|
||||
},
|
||||
else => 700_000_000,
|
||||
},
|
||||
}));
|
||||
|
||||
test_modules_step.dependOn(tests.addModuleTests(b, .{
|
||||
|
|
@ -596,8 +519,6 @@ pub fn build(b: *std.Build) !void {
|
|||
.skip_single_threaded = skip_single_threaded,
|
||||
.skip_non_native = skip_non_native,
|
||||
.test_default_only = no_matrix,
|
||||
.skip_spirv = skip_spirv,
|
||||
.skip_wasm = skip_wasm,
|
||||
.skip_freebsd = skip_freebsd,
|
||||
.skip_netbsd = skip_netbsd,
|
||||
.skip_windows = skip_windows,
|
||||
|
|
@ -605,29 +526,8 @@ pub fn build(b: *std.Build) !void {
|
|||
.skip_linux = skip_linux,
|
||||
.skip_llvm = skip_llvm,
|
||||
.skip_libc = skip_libc,
|
||||
.max_rss = switch (b.graph.host.result.os.tag) {
|
||||
.freebsd => switch (b.graph.host.result.cpu.arch) {
|
||||
.x86_64 => 3_756_422_348,
|
||||
else => 3_800_000_000,
|
||||
},
|
||||
.linux => switch (b.graph.host.result.cpu.arch) {
|
||||
.aarch64 => 6_732_817_203,
|
||||
.loongarch64 => 3_216_349_593,
|
||||
.riscv64 => 3_570_899_763,
|
||||
.s390x => 3_652_514_201,
|
||||
.x86_64 => 3_249_546_854,
|
||||
else => 6_800_000_000,
|
||||
},
|
||||
.macos => switch (b.graph.host.result.cpu.arch) {
|
||||
.aarch64 => 8_273_795_481,
|
||||
else => 8_300_000_000,
|
||||
},
|
||||
.windows => switch (b.graph.host.result.cpu.arch) {
|
||||
.x86_64 => 3_750_236_160,
|
||||
else => 3_800_000_000,
|
||||
},
|
||||
else => 8_300_000_000,
|
||||
},
|
||||
// I observed a value of 5605064704 on the M2 CI.
|
||||
.max_rss = 6165571174,
|
||||
}));
|
||||
|
||||
const unit_tests_step = b.step("test-unit", "Run the compiler source unit tests");
|
||||
|
|
@ -643,29 +543,6 @@ pub fn build(b: *std.Build) !void {
|
|||
.use_llvm = use_llvm,
|
||||
.use_lld = use_llvm,
|
||||
.zig_lib_dir = b.path("lib"),
|
||||
.max_rss = switch (b.graph.host.result.os.tag) {
|
||||
.freebsd => switch (b.graph.host.result.cpu.arch) {
|
||||
.x86_64 => 2_188_099_584,
|
||||
else => 2_200_000_000,
|
||||
},
|
||||
.linux => switch (b.graph.host.result.cpu.arch) {
|
||||
.aarch64 => 1_991_934_771,
|
||||
.loongarch64 => 1_844_538_572,
|
||||
.riscv64 => 2_459_003_289,
|
||||
.s390x => 1_781_248_409,
|
||||
.x86_64 => 977_192_550,
|
||||
else => 2_500_000_000,
|
||||
},
|
||||
.macos => switch (b.graph.host.result.cpu.arch) {
|
||||
.aarch64 => 2_062_393_344,
|
||||
else => 2_100_000_000,
|
||||
},
|
||||
.windows => switch (b.graph.host.result.cpu.arch) {
|
||||
.x86_64 => 1_953_087_488,
|
||||
else => 2_000_000_000,
|
||||
},
|
||||
else => 2_500_000_000,
|
||||
},
|
||||
});
|
||||
if (link_libc) {
|
||||
unit_tests.root_module.link_libc = true;
|
||||
|
|
@ -683,7 +560,6 @@ pub fn build(b: *std.Build) !void {
|
|||
test_step.dependOn(tests.addCAbiTests(b, .{
|
||||
.test_target_filters = test_target_filters,
|
||||
.skip_non_native = skip_non_native,
|
||||
.skip_wasm = skip_wasm,
|
||||
.skip_freebsd = skip_freebsd,
|
||||
.skip_netbsd = skip_netbsd,
|
||||
.skip_windows = skip_windows,
|
||||
|
|
@ -691,29 +567,6 @@ pub fn build(b: *std.Build) !void {
|
|||
.skip_linux = skip_linux,
|
||||
.skip_llvm = skip_llvm,
|
||||
.skip_release = skip_release,
|
||||
.max_rss = switch (b.graph.host.result.os.tag) {
|
||||
.freebsd => switch (b.graph.host.result.cpu.arch) {
|
||||
.x86_64 => 727_221_862,
|
||||
else => 800_000_000,
|
||||
},
|
||||
.linux => switch (b.graph.host.result.cpu.arch) {
|
||||
.aarch64 => 1_318_185_369,
|
||||
.loongarch64 => 1_422_904_524,
|
||||
.riscv64 => 449_924_710,
|
||||
.s390x => 1_946_743_603,
|
||||
.x86_64 => 2_139_993_292,
|
||||
else => 2_200_000_000,
|
||||
},
|
||||
.macos => switch (b.graph.host.result.cpu.arch) {
|
||||
.aarch64 => 1_813_612_134,
|
||||
else => 1_900_000_000,
|
||||
},
|
||||
.windows => switch (b.graph.host.result.cpu.arch) {
|
||||
.x86_64 => 386_287_616,
|
||||
else => 400_000_000,
|
||||
},
|
||||
else => 2_200_000_000,
|
||||
},
|
||||
}));
|
||||
test_step.dependOn(tests.addLinkTests(b, enable_macos_sdk, enable_ios_sdk, enable_symlinks_windows));
|
||||
test_step.dependOn(tests.addStackTraceTests(b, test_filters, skip_non_native));
|
||||
|
|
@ -763,7 +616,6 @@ pub fn build(b: *std.Build) !void {
|
|||
.optimize_modes = optimization_modes,
|
||||
.test_filters = test_filters,
|
||||
.test_target_filters = test_target_filters,
|
||||
.skip_wasm = skip_wasm,
|
||||
// Highest RSS observed in any test case was exactly 1802878976 on x86_64-linux.
|
||||
.max_rss = 2253598720,
|
||||
})) |test_libc_step| test_step.dependOn(test_libc_step);
|
||||
|
|
@ -869,29 +721,7 @@ fn addCompilerMod(b: *std.Build, options: AddCompilerModOptions) *std.Build.Modu
|
|||
fn addCompilerStep(b: *std.Build, options: AddCompilerModOptions) *std.Build.Step.Compile {
|
||||
const exe = b.addExecutable(.{
|
||||
.name = "zig",
|
||||
.max_rss = switch (b.graph.host.result.os.tag) {
|
||||
.freebsd => switch (b.graph.host.result.cpu.arch) {
|
||||
.x86_64 => 6_044_158_771,
|
||||
else => 6_100_000_000,
|
||||
},
|
||||
.linux => switch (b.graph.host.result.cpu.arch) {
|
||||
.aarch64 => 6_240_805_683,
|
||||
.loongarch64 => 5_024_158_515,
|
||||
.riscv64 => 6_996_309_196,
|
||||
.s390x => 4_997_174_476,
|
||||
.x86_64 => 5_486_090_649,
|
||||
else => 7_000_000_000,
|
||||
},
|
||||
.macos => switch (b.graph.host.result.cpu.arch) {
|
||||
.aarch64 => 6_639_145_779,
|
||||
else => 6_700_000_000,
|
||||
},
|
||||
.windows => switch (b.graph.host.result.cpu.arch) {
|
||||
.x86_64 => 5_770_394_009,
|
||||
else => 5_800_000_000,
|
||||
},
|
||||
else => 7_000_000_000,
|
||||
},
|
||||
.max_rss = 7_800_000_000,
|
||||
.root_module = addCompilerMod(b, options),
|
||||
});
|
||||
exe.stack_size = stack_size;
|
||||
|
|
@ -968,7 +798,7 @@ fn addCmakeCfgOptionsToExe(
|
|||
};
|
||||
mod.linkSystemLibrary("unwind", .{});
|
||||
},
|
||||
.driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => {
|
||||
.ios, .macos, .watchos, .tvos, .visionos => {
|
||||
mod.link_libcpp = true;
|
||||
},
|
||||
.windows => {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ ninja install
|
|||
|
||||
# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
|
||||
stage3-debug/bin/zig build test docs \
|
||||
--maxrss ${ZSF_MAX_RSS:-0} \
|
||||
--maxrss 44918199637 \
|
||||
-Dstatic-llvm \
|
||||
-Dskip-non-native \
|
||||
-Dtarget=native-native-musl \
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ ninja install
|
|||
|
||||
# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
|
||||
stage3-release/bin/zig build test docs \
|
||||
--maxrss ${ZSF_MAX_RSS:-0} \
|
||||
--maxrss 44918199637 \
|
||||
-Dstatic-llvm \
|
||||
-Dskip-non-native \
|
||||
-Dtarget=native-native-musl \
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ cmake .. \
|
|||
ninja install
|
||||
|
||||
stage3-debug/bin/zig build test docs \
|
||||
--maxrss ${ZSF_MAX_RSS:-0} \
|
||||
--zig-lib-dir "$PWD/../lib" \
|
||||
-Denable-macos-sdk \
|
||||
-Dstatic-llvm \
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ stage3-release/bin/zig build test docs \
|
|||
|
||||
# Ensure that stage3 and stage4 are byte-for-byte identical.
|
||||
stage3-release/bin/zig build \
|
||||
--maxrss ${ZSF_MAX_RSS:-0} \
|
||||
--prefix stage4-release \
|
||||
-Denable-llvm \
|
||||
-Dno-lib \
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ $ZIG_LLVM_CLANG_LLD_URL = "https://ziglang.org/deps/$ZIG_LLVM_CLANG_LLD_NAME.zip
|
|||
$PREFIX_PATH = "$(Get-Location)\..\$ZIG_LLVM_CLANG_LLD_NAME"
|
||||
$ZIG = "$PREFIX_PATH\bin\zig.exe"
|
||||
$ZIG_LIB_DIR = "$(Get-Location)\lib"
|
||||
$ZSF_MAX_RSS = if ($Env:ZSF_MAX_RSS) { $Env:ZSF_MAX_RSS } else { 0 }
|
||||
|
||||
if (!(Test-Path "..\$ZIG_LLVM_CLANG_LLD_NAME.zip")) {
|
||||
Write-Output "Downloading $ZIG_LLVM_CLANG_LLD_URL"
|
||||
|
|
@ -55,7 +54,6 @@ CheckLastExitCode
|
|||
|
||||
Write-Output "Main test suite..."
|
||||
& "stage3-release\bin\zig.exe" build test docs `
|
||||
--maxrss $ZSF_MAX_RSS `
|
||||
--zig-lib-dir "$ZIG_LIB_DIR" `
|
||||
--search-prefix "$PREFIX_PATH" `
|
||||
-Dstatic-llvm `
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ ninja install
|
|||
|
||||
# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
|
||||
stage3-debug/bin/zig build test docs \
|
||||
--maxrss ${ZSF_MAX_RSS:-0} \
|
||||
--maxrss 60129542144 \
|
||||
-Dstatic-llvm \
|
||||
-Dskip-non-native \
|
||||
-Dtarget=native-native-musl \
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ ninja install
|
|||
|
||||
# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
|
||||
stage3-release/bin/zig build test docs \
|
||||
--maxrss ${ZSF_MAX_RSS:-0} \
|
||||
--maxrss 60129542144 \
|
||||
-Dstatic-llvm \
|
||||
-Dskip-non-native \
|
||||
-Dtarget=native-native-musl \
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ ninja install
|
|||
|
||||
# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
|
||||
stage3-debug/bin/zig build test-cases test-modules test-unit test-c-abi test-stack-traces test-error-traces test-llvm-ir \
|
||||
--maxrss ${ZSF_MAX_RSS:-0} \
|
||||
--maxrss 68719476736 \
|
||||
-Dstatic-llvm \
|
||||
-Dskip-non-native \
|
||||
-Dskip-single-threaded \
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ ninja install
|
|||
|
||||
# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
|
||||
stage3-release/bin/zig build test-cases test-modules test-unit test-c-abi test-stack-traces test-error-traces test-llvm-ir \
|
||||
--maxrss ${ZSF_MAX_RSS:-0} \
|
||||
--maxrss 68719476736 \
|
||||
-Dstatic-llvm \
|
||||
-Dskip-non-native \
|
||||
-Dskip-single-threaded \
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ ninja install
|
|||
|
||||
# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
|
||||
stage3-debug/bin/zig build test docs \
|
||||
--maxrss ${ZSF_MAX_RSS:-0} \
|
||||
--maxrss 30064771072 \
|
||||
-Dstatic-llvm \
|
||||
-Dskip-non-native \
|
||||
-Dtarget=native-native-musl \
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ ninja install
|
|||
|
||||
# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
|
||||
stage3-release/bin/zig build test docs \
|
||||
--maxrss ${ZSF_MAX_RSS:-0} \
|
||||
--maxrss 30064771072 \
|
||||
-Dstatic-llvm \
|
||||
-Dskip-non-native \
|
||||
-Dtarget=native-native-musl \
|
||||
|
|
|
|||
|
|
@ -44,10 +44,8 @@ unset CXX
|
|||
ninja install
|
||||
|
||||
stage3-debug/bin/zig build test docs \
|
||||
--maxrss ${ZSF_MAX_RSS:-0} \
|
||||
--maxrss 42949672960 \
|
||||
-Dstatic-llvm \
|
||||
-Dskip-spirv \
|
||||
-Dskip-wasm \
|
||||
-Dskip-linux \
|
||||
-Dskip-netbsd \
|
||||
-Dskip-windows \
|
||||
|
|
|
|||
|
|
@ -44,10 +44,8 @@ unset CXX
|
|||
ninja install
|
||||
|
||||
stage3-release/bin/zig build test docs \
|
||||
--maxrss ${ZSF_MAX_RSS:-0} \
|
||||
--maxrss 42949672960 \
|
||||
-Dstatic-llvm \
|
||||
-Dskip-spirv \
|
||||
-Dskip-wasm \
|
||||
-Dskip-linux \
|
||||
-Dskip-netbsd \
|
||||
-Dskip-windows \
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ stage3-debug/bin/zig build \
|
|||
-Dno-lib
|
||||
|
||||
stage3-debug/bin/zig build test docs \
|
||||
--maxrss ${ZSF_MAX_RSS:-0} \
|
||||
--maxrss 21000000000 \
|
||||
-Dlldb=$HOME/deps/lldb-zig/Debug-e0a42bb34/bin/lldb \
|
||||
-fqemu \
|
||||
-fwasmtime \
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ stage3-debug/bin/zig build \
|
|||
-Dno-lib
|
||||
|
||||
stage3-debug/bin/zig build test docs \
|
||||
--maxrss ${ZSF_MAX_RSS:-0} \
|
||||
--maxrss 21000000000 \
|
||||
-Dlldb=$HOME/deps/lldb-zig/Debug-e0a42bb34/bin/lldb \
|
||||
-fqemu \
|
||||
-fwasmtime \
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ stage3-release/bin/zig build \
|
|||
-Dno-lib
|
||||
|
||||
stage3-release/bin/zig build test docs \
|
||||
--maxrss ${ZSF_MAX_RSS:-0} \
|
||||
--maxrss 21000000000 \
|
||||
-Dlldb=$HOME/deps/lldb-zig/Release-e0a42bb34/bin/lldb \
|
||||
-fqemu \
|
||||
-fwasmtime \
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ $ZIG_LLVM_CLANG_LLD_URL = "https://ziglang.org/deps/$ZIG_LLVM_CLANG_LLD_NAME.zip
|
|||
$PREFIX_PATH = "$($Env:USERPROFILE)\$ZIG_LLVM_CLANG_LLD_NAME"
|
||||
$ZIG = "$PREFIX_PATH\bin\zig.exe"
|
||||
$ZIG_LIB_DIR = "$(Get-Location)\lib"
|
||||
$ZSF_MAX_RSS = if ($Env:ZSF_MAX_RSS) { $Env:ZSF_MAX_RSS } else { 0 }
|
||||
|
||||
if (!(Test-Path "$PREFIX_PATH.zip")) {
|
||||
Write-Output "Downloading $ZIG_LLVM_CLANG_LLD_URL"
|
||||
|
|
@ -55,11 +54,12 @@ CheckLastExitCode
|
|||
|
||||
Write-Output "Main test suite..."
|
||||
& "stage3-debug\bin\zig.exe" build test docs `
|
||||
--maxrss $ZSF_MAX_RSS `
|
||||
--maxrss 32212254720 `
|
||||
--zig-lib-dir "$ZIG_LIB_DIR" `
|
||||
--search-prefix "$PREFIX_PATH" `
|
||||
-Dstatic-llvm `
|
||||
-Dskip-non-native `
|
||||
-Dskip-release `
|
||||
-Dskip-test-incremental `
|
||||
-Denable-symlinks-windows `
|
||||
--test-timeout 30m
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ $ZIG_LLVM_CLANG_LLD_URL = "https://ziglang.org/deps/$ZIG_LLVM_CLANG_LLD_NAME.zip
|
|||
$PREFIX_PATH = "$($Env:USERPROFILE)\$ZIG_LLVM_CLANG_LLD_NAME"
|
||||
$ZIG = "$PREFIX_PATH\bin\zig.exe"
|
||||
$ZIG_LIB_DIR = "$(Get-Location)\lib"
|
||||
$ZSF_MAX_RSS = if ($Env:ZSF_MAX_RSS) { $Env:ZSF_MAX_RSS } else { 0 }
|
||||
|
||||
if (!(Test-Path "$PREFIX_PATH.zip")) {
|
||||
Write-Output "Downloading $ZIG_LLVM_CLANG_LLD_URL"
|
||||
|
|
@ -55,7 +54,7 @@ CheckLastExitCode
|
|||
|
||||
Write-Output "Main test suite..."
|
||||
& "stage3-release\bin\zig.exe" build test docs `
|
||||
--maxrss $ZSF_MAX_RSS `
|
||||
--maxrss 32212254720 `
|
||||
--zig-lib-dir "$ZIG_LIB_DIR" `
|
||||
--search-prefix "$PREFIX_PATH" `
|
||||
-Dstatic-llvm `
|
||||
|
|
|
|||
|
|
@ -4471,7 +4471,7 @@ pub const rusage = switch (native_os) {
|
|||
pub const SELF = 1;
|
||||
pub const CHILDREN = 2;
|
||||
},
|
||||
.freebsd, .openbsd => extern struct {
|
||||
.freebsd => extern struct {
|
||||
utime: timeval,
|
||||
stime: timeval,
|
||||
maxrss: c_long,
|
||||
|
|
@ -4493,27 +4493,6 @@ pub const rusage = switch (native_os) {
|
|||
pub const CHILDREN = -1;
|
||||
pub const THREAD = 1;
|
||||
},
|
||||
.dragonfly, .netbsd => extern struct {
|
||||
utime: timeval,
|
||||
stime: timeval,
|
||||
maxrss: c_long,
|
||||
ixrss: c_long,
|
||||
idrss: c_long,
|
||||
isrss: c_long,
|
||||
minflt: c_long,
|
||||
majflt: c_long,
|
||||
nswap: c_long,
|
||||
inblock: c_long,
|
||||
oublock: c_long,
|
||||
msgsnd: c_long,
|
||||
msgrcv: c_long,
|
||||
nsignals: c_long,
|
||||
nvcsw: c_long,
|
||||
nivcsw: c_long,
|
||||
|
||||
pub const SELF = 0;
|
||||
pub const CHILDREN = -1;
|
||||
},
|
||||
else => void,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ pub const ResourceUsageStatistics = struct {
|
|||
/// if available.
|
||||
pub inline fn getMaxRss(rus: ResourceUsageStatistics) ?usize {
|
||||
switch (native_os) {
|
||||
.dragonfly, .freebsd, .netbsd, .openbsd, .illumos, .linux, .serenity => {
|
||||
.linux => {
|
||||
if (rus.rusage) |ru| {
|
||||
return @as(usize, @intCast(ru.maxrss)) * 1024;
|
||||
} else {
|
||||
|
|
@ -149,21 +149,7 @@ pub const ResourceUsageStatistics = struct {
|
|||
}
|
||||
|
||||
const rusage_init = switch (native_os) {
|
||||
.dragonfly,
|
||||
.freebsd,
|
||||
.netbsd,
|
||||
.openbsd,
|
||||
.illumos,
|
||||
.linux,
|
||||
.serenity,
|
||||
.driverkit,
|
||||
.ios,
|
||||
.maccatalyst,
|
||||
.macos,
|
||||
.tvos,
|
||||
.visionos,
|
||||
.watchos,
|
||||
=> @as(?posix.rusage, null),
|
||||
.linux, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => @as(?posix.rusage, null),
|
||||
.windows => @as(?windows.VM_COUNTERS, null),
|
||||
else => {},
|
||||
};
|
||||
|
|
@ -500,21 +486,7 @@ fn waitUnwrappedPosix(self: *ChildProcess) void {
|
|||
const res: posix.WaitPidResult = res: {
|
||||
if (self.request_resource_usage_statistics) {
|
||||
switch (native_os) {
|
||||
.dragonfly,
|
||||
.freebsd,
|
||||
.netbsd,
|
||||
.openbsd,
|
||||
.illumos,
|
||||
.linux,
|
||||
.serenity,
|
||||
.driverkit,
|
||||
.ios,
|
||||
.maccatalyst,
|
||||
.macos,
|
||||
.tvos,
|
||||
.visionos,
|
||||
.watchos,
|
||||
=> {
|
||||
.linux, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => {
|
||||
var ru: posix.rusage = undefined;
|
||||
const res = posix.wait4(self.id, 0, &ru);
|
||||
self.resource_usage_statistics.rusage = ru;
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ test "type coercion from int to float" {
|
|||
try check.edgeValues(f128, u113);
|
||||
try check.edgeValues(f128, i114);
|
||||
|
||||
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
|
||||
|
||||
// Basic sanity check that the coercions work for vectors too.
|
||||
const int_vec: @Vector(2, u24) = @splat(123);
|
||||
|
|
|
|||
|
|
@ -444,8 +444,6 @@ pub const CaseTestOptions = struct {
|
|||
test_target_filters: []const []const u8,
|
||||
skip_compile_errors: bool,
|
||||
skip_non_native: bool,
|
||||
skip_spirv: bool,
|
||||
skip_wasm: bool,
|
||||
skip_freebsd: bool,
|
||||
skip_netbsd: bool,
|
||||
skip_windows: bool,
|
||||
|
|
@ -474,9 +472,6 @@ pub fn lowerToBuildSteps(
|
|||
if (options.skip_non_native and !case.target.query.isNative())
|
||||
continue;
|
||||
|
||||
if (options.skip_spirv and case.target.query.cpu_arch != null and case.target.query.cpu_arch.?.isSpirV()) continue;
|
||||
if (options.skip_wasm and case.target.query.cpu_arch != null and case.target.query.cpu_arch.?.isWasm()) continue;
|
||||
|
||||
if (options.skip_freebsd and case.target.query.os_tag == .freebsd) continue;
|
||||
if (options.skip_netbsd and case.target.query.os_tag == .netbsd) continue;
|
||||
if (options.skip_windows and case.target.query.os_tag == .windows) continue;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ pub const Options = struct {
|
|||
optimize_modes: []const std.builtin.OptimizeMode,
|
||||
test_filters: []const []const u8,
|
||||
test_target_filters: []const []const u8,
|
||||
skip_wasm: bool,
|
||||
max_rss: usize,
|
||||
};
|
||||
|
||||
|
|
@ -42,8 +41,6 @@ pub fn addLibcTestCase(
|
|||
}
|
||||
|
||||
pub fn addTarget(libc: *const Libc, target: std.Build.ResolvedTarget) void {
|
||||
if (libc.options.skip_wasm and target.query.cpu_arch != null and target.query.cpu_arch.?.isWasm()) return;
|
||||
|
||||
if (libc.options.test_target_filters.len > 0) {
|
||||
const triple_txt = target.query.zigTriple(libc.b.allocator) catch @panic("OOM");
|
||||
for (libc.options.test_target_filters) |filter| {
|
||||
|
|
|
|||
|
|
@ -2246,8 +2246,6 @@ const ModuleTestOptions = struct {
|
|||
test_default_only: bool,
|
||||
skip_single_threaded: bool,
|
||||
skip_non_native: bool,
|
||||
skip_spirv: bool,
|
||||
skip_wasm: bool,
|
||||
skip_freebsd: bool,
|
||||
skip_netbsd: bool,
|
||||
skip_windows: bool,
|
||||
|
|
@ -2283,9 +2281,6 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step {
|
|||
if (options.skip_non_native and !test_target.target.isNative())
|
||||
continue;
|
||||
|
||||
if (options.skip_spirv and test_target.target.cpu_arch != null and test_target.target.cpu_arch.?.isSpirV()) continue;
|
||||
if (options.skip_wasm and test_target.target.cpu_arch != null and test_target.target.cpu_arch.?.isWasm()) continue;
|
||||
|
||||
if (options.skip_freebsd and test_target.target.os_tag == .freebsd) continue;
|
||||
if (options.skip_netbsd and test_target.target.os_tag == .netbsd) continue;
|
||||
if (options.skip_windows and test_target.target.os_tag == .windows) continue;
|
||||
|
|
@ -2344,11 +2339,8 @@ fn addOneModuleTest(
|
|||
const libc_suffix = if (test_target.link_libc == true) "-libc" else "";
|
||||
const model_txt = target.cpu.model.name;
|
||||
|
||||
// These emulated targets need a lot more RAM for unknown reasons.
|
||||
const max_rss = if (mem.eql(u8, options.name, "std") and
|
||||
(target.cpu.arch == .hexagon or
|
||||
(target.cpu.arch.isRISCV() and !resolved_target.query.isNative()) or
|
||||
target.cpu.arch.isWasm()))
|
||||
// wasm32-wasi builds need more RAM, idk why
|
||||
const max_rss = if (target.os.tag == .wasi)
|
||||
options.max_rss * 2
|
||||
else
|
||||
options.max_rss;
|
||||
|
|
@ -2527,7 +2519,6 @@ pub fn wouldUseLlvm(use_llvm: ?bool, query: std.Target.Query, optimize_mode: Opt
|
|||
const CAbiTestOptions = struct {
|
||||
test_target_filters: []const []const u8,
|
||||
skip_non_native: bool,
|
||||
skip_wasm: bool,
|
||||
skip_freebsd: bool,
|
||||
skip_netbsd: bool,
|
||||
skip_windows: bool,
|
||||
|
|
@ -2535,7 +2526,6 @@ const CAbiTestOptions = struct {
|
|||
skip_linux: bool,
|
||||
skip_llvm: bool,
|
||||
skip_release: bool,
|
||||
max_rss: usize = 0,
|
||||
};
|
||||
|
||||
pub fn addCAbiTests(b: *std.Build, options: CAbiTestOptions) *Step {
|
||||
|
|
@ -2548,9 +2538,6 @@ pub fn addCAbiTests(b: *std.Build, options: CAbiTestOptions) *Step {
|
|||
|
||||
for (c_abi_targets) |c_abi_target| {
|
||||
if (options.skip_non_native and !c_abi_target.target.isNative()) continue;
|
||||
|
||||
if (options.skip_wasm and c_abi_target.target.cpu_arch != null and c_abi_target.target.cpu_arch.?.isWasm()) continue;
|
||||
|
||||
if (options.skip_freebsd and c_abi_target.target.os_tag == .freebsd) continue;
|
||||
if (options.skip_netbsd and c_abi_target.target.os_tag == .netbsd) continue;
|
||||
if (options.skip_windows and c_abi_target.target.os_tag == .windows) continue;
|
||||
|
|
@ -2608,7 +2595,6 @@ pub fn addCAbiTests(b: *std.Build, options: CAbiTestOptions) *Step {
|
|||
.root_module = test_mod,
|
||||
.use_llvm = c_abi_target.use_llvm,
|
||||
.use_lld = c_abi_target.use_lld,
|
||||
.max_rss = options.max_rss,
|
||||
});
|
||||
|
||||
// This test is intentionally trying to check if the external ABI is
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue