mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-26 13:01:34 +03:00
test-standalone: explicitly link to advapi32 sometimes
Now, nearly every object produced by zig has a dependency on advapi32.dll due to the dependency on RtlGenRandom due to the implementation of dirCreateFileAtomic which is now analyzed whether or not it is used.
This commit is contained in:
@@ -32,6 +32,7 @@ pub fn build(b: *std.Build) void {
|
||||
}),
|
||||
});
|
||||
exe.subsystem = .console;
|
||||
exe.root_module.linkSystemLibrary("advapi32", .{}); // for RtlGenRandom
|
||||
exe.root_module.linkSystemLibrary("kernel32", .{});
|
||||
exe.root_module.linkSystemLibrary("ntdll", .{});
|
||||
exe.root_module.addObject(obj);
|
||||
|
||||
@@ -12,6 +12,7 @@ pub fn build(b: *std.Build) void {
|
||||
test_obj.root_module.linkSystemLibrary("ntdll", .{});
|
||||
test_obj.root_module.linkSystemLibrary("kernel32", .{});
|
||||
test_obj.root_module.linkSystemLibrary("ws2_32", .{});
|
||||
test_obj.root_module.linkSystemLibrary("advapi32", .{}); // for RtlGenRandom
|
||||
}
|
||||
|
||||
const test_exe_mod = b.createModule(.{
|
||||
|
||||
@@ -86,6 +86,7 @@ pub fn build(b: *std.Build) !void {
|
||||
.optimize = optimize,
|
||||
}),
|
||||
});
|
||||
lib_msvc.root_module.linkSystemLibrary("advapi32", .{}); // for RtlGenRandom
|
||||
const verify_msvc = b.addExecutable(.{
|
||||
.name = "verify-msvc",
|
||||
.root_module = b.createModule(.{
|
||||
|
||||
Reference in New Issue
Block a user