2022-05-28 10:44:53 +01:00
|
|
|
const std = @import("std");
|
|
|
|
const builtin = @import("builtin");
|
|
|
|
const tests = @import("tests.zig");
|
|
|
|
|
|
|
|
pub fn addCases(cases: *tests.StandaloneContext) void {
|
|
|
|
cases.addBuildFile("test/link/bss/build.zig", .{
|
|
|
|
.build_modes = false, // we only guarantee zerofill for undefined in Debug
|
|
|
|
});
|
|
|
|
|
|
|
|
cases.addBuildFile("test/link/common_symbols/build.zig", .{
|
|
|
|
.build_modes = true,
|
|
|
|
});
|
|
|
|
|
|
|
|
cases.addBuildFile("test/link/common_symbols_alignment/build.zig", .{
|
|
|
|
.build_modes = true,
|
|
|
|
});
|
|
|
|
|
|
|
|
cases.addBuildFile("test/link/interdependent_static_c_libs/build.zig", .{
|
|
|
|
.build_modes = true,
|
|
|
|
});
|
|
|
|
|
|
|
|
cases.addBuildFile("test/link/static_lib_as_system_lib/build.zig", .{
|
|
|
|
.build_modes = true,
|
|
|
|
});
|
|
|
|
|
2022-08-17 09:46:42 +01:00
|
|
|
addWasmCases(cases);
|
|
|
|
addMachOCases(cases);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn addWasmCases(cases: *tests.StandaloneContext) void {
|
2022-09-08 13:29:51 +01:00
|
|
|
cases.addBuildFile("test/link/wasm/archive/build.zig", .{
|
2022-07-12 13:36:33 +01:00
|
|
|
.build_modes = true,
|
|
|
|
.requires_stage2 = true,
|
|
|
|
});
|
|
|
|
|
2022-09-08 13:29:51 +01:00
|
|
|
cases.addBuildFile("test/link/wasm/bss/build.zig", .{
|
2022-10-02 17:39:47 +01:00
|
|
|
.build_modes = false,
|
2022-07-12 13:36:33 +01:00
|
|
|
.requires_stage2 = true,
|
|
|
|
});
|
|
|
|
|
2022-09-08 13:29:51 +01:00
|
|
|
cases.addBuildFile("test/link/wasm/extern/build.zig", .{
|
2022-07-12 13:36:33 +01:00
|
|
|
.build_modes = true,
|
|
|
|
.requires_stage2 = true,
|
2022-09-08 13:29:51 +01:00
|
|
|
.use_emulation = true,
|
2022-07-12 13:36:33 +01:00
|
|
|
});
|
|
|
|
|
2022-10-02 17:39:47 +01:00
|
|
|
cases.addBuildFile("test/link/wasm/producers/build.zig", .{
|
|
|
|
.build_modes = true,
|
|
|
|
.requires_stage2 = true,
|
|
|
|
});
|
|
|
|
|
2022-09-08 13:29:51 +01:00
|
|
|
cases.addBuildFile("test/link/wasm/segments/build.zig", .{
|
2022-07-12 13:36:33 +01:00
|
|
|
.build_modes = true,
|
|
|
|
.requires_stage2 = true,
|
|
|
|
});
|
2022-08-20 14:46:39 +01:00
|
|
|
|
2022-09-08 13:29:51 +01:00
|
|
|
cases.addBuildFile("test/link/wasm/stack_pointer/build.zig", .{
|
2022-08-20 14:46:39 +01:00
|
|
|
.build_modes = true,
|
|
|
|
.requires_stage2 = true,
|
|
|
|
});
|
2022-08-26 16:29:43 +01:00
|
|
|
|
2022-09-08 13:29:51 +01:00
|
|
|
cases.addBuildFile("test/link/wasm/type/build.zig", .{
|
2022-08-26 16:29:43 +01:00
|
|
|
.build_modes = true,
|
|
|
|
.requires_stage2 = true,
|
|
|
|
});
|
2022-08-17 09:46:42 +01:00
|
|
|
}
|
2022-07-12 13:36:33 +01:00
|
|
|
|
2022-08-17 09:46:42 +01:00
|
|
|
fn addMachOCases(cases: *tests.StandaloneContext) void {
|
2022-07-10 17:28:14 +01:00
|
|
|
cases.addBuildFile("test/link/macho/dead_strip/build.zig", .{
|
|
|
|
.build_modes = false,
|
|
|
|
});
|
|
|
|
|
|
|
|
cases.addBuildFile("test/link/macho/dead_strip_dylibs/build.zig", .{
|
|
|
|
.build_modes = true,
|
|
|
|
.requires_macos_sdk = true,
|
|
|
|
});
|
|
|
|
|
2022-08-17 09:46:42 +01:00
|
|
|
cases.addBuildFile("test/link/macho/dylib/build.zig", .{
|
2022-07-10 17:28:14 +01:00
|
|
|
.build_modes = true,
|
|
|
|
});
|
|
|
|
|
2022-09-17 16:22:47 +01:00
|
|
|
cases.addBuildFile("test/link/macho/empty/build.zig", .{
|
|
|
|
.build_modes = true,
|
|
|
|
});
|
|
|
|
|
2022-08-17 09:46:42 +01:00
|
|
|
cases.addBuildFile("test/link/macho/entry/build.zig", .{
|
2022-07-10 17:28:14 +01:00
|
|
|
.build_modes = true,
|
|
|
|
});
|
|
|
|
|
2022-08-17 09:46:42 +01:00
|
|
|
cases.addBuildFile("test/link/macho/headerpad/build.zig", .{
|
2022-07-10 17:28:14 +01:00
|
|
|
.build_modes = true,
|
|
|
|
.requires_macos_sdk = true,
|
|
|
|
});
|
|
|
|
|
2022-10-18 12:02:10 +01:00
|
|
|
cases.addBuildFile("test/link/macho/linksection/build.zig", .{
|
|
|
|
.build_modes = true,
|
|
|
|
});
|
|
|
|
|
2022-08-17 09:46:42 +01:00
|
|
|
cases.addBuildFile("test/link/macho/needed_framework/build.zig", .{
|
2022-07-10 17:28:14 +01:00
|
|
|
.build_modes = true,
|
|
|
|
.requires_macos_sdk = true,
|
|
|
|
});
|
|
|
|
|
2022-08-17 09:46:42 +01:00
|
|
|
cases.addBuildFile("test/link/macho/needed_library/build.zig", .{
|
|
|
|
.build_modes = true,
|
|
|
|
});
|
|
|
|
|
2022-07-10 17:28:14 +01:00
|
|
|
cases.addBuildFile("test/link/macho/objc/build.zig", .{
|
|
|
|
.build_modes = true,
|
|
|
|
.requires_macos_sdk = true,
|
|
|
|
});
|
|
|
|
|
|
|
|
cases.addBuildFile("test/link/macho/objcpp/build.zig", .{
|
|
|
|
.build_modes = true,
|
|
|
|
.requires_macos_sdk = true,
|
|
|
|
});
|
|
|
|
|
2022-08-17 09:46:42 +01:00
|
|
|
cases.addBuildFile("test/link/macho/pagezero/build.zig", .{
|
|
|
|
.build_modes = false,
|
2022-07-10 17:28:14 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
cases.addBuildFile("test/link/macho/search_strategy/build.zig", .{
|
|
|
|
.build_modes = true,
|
|
|
|
});
|
|
|
|
|
2022-08-17 09:46:42 +01:00
|
|
|
cases.addBuildFile("test/link/macho/stack_size/build.zig", .{
|
2022-07-10 17:28:14 +01:00
|
|
|
.build_modes = true,
|
|
|
|
});
|
2022-08-17 08:00:23 +01:00
|
|
|
|
|
|
|
cases.addBuildFile("test/link/macho/tls/build.zig", .{
|
|
|
|
.build_modes = true,
|
|
|
|
});
|
2022-08-17 09:46:42 +01:00
|
|
|
|
|
|
|
cases.addBuildFile("test/link/macho/weak_library/build.zig", .{
|
|
|
|
.build_modes = true,
|
|
|
|
});
|
|
|
|
|
|
|
|
cases.addBuildFile("test/link/macho/weak_framework/build.zig", .{
|
|
|
|
.build_modes = true,
|
|
|
|
.requires_macos_sdk = true,
|
|
|
|
});
|
2022-05-28 10:44:53 +01:00
|
|
|
}
|