Revert "Sema: Stop adding Windows implib link inputs for extern "..." syntax."
This reverts commit b461d07a54.
After some discussion in the team, we've decided that this is too disruptive,
especially because the linker errors are less than helpful. That's a fixable
problem, so we might reconsider this in the future, but revert it for now.
This commit is contained in:
@@ -50,10 +50,6 @@ pub fn build(b: *std.Build) void {
|
||||
});
|
||||
if (case.link_libc) exe.root_module.link_libc = true;
|
||||
|
||||
if (resolved_target.result.os.tag == .windows) {
|
||||
exe.root_module.linkSystemLibrary("advapi32", .{});
|
||||
}
|
||||
|
||||
_ = exe.getEmittedBin();
|
||||
|
||||
step.dependOn(&exe.step);
|
||||
@@ -70,10 +66,6 @@ pub fn build(b: *std.Build) void {
|
||||
});
|
||||
if (case.link_libc) exe.root_module.link_libc = true;
|
||||
|
||||
if (resolved_target.result.os.tag == .windows) {
|
||||
exe.root_module.linkSystemLibrary("advapi32", .{});
|
||||
}
|
||||
|
||||
const run = b.addRunArtifact(exe);
|
||||
step.dependOn(&run.step);
|
||||
}
|
||||
|
||||
@@ -47,8 +47,6 @@ pub fn build(b: *std.Build) !void {
|
||||
}),
|
||||
});
|
||||
|
||||
fuzz.root_module.linkSystemLibrary("advapi32", .{});
|
||||
|
||||
const fuzz_max_iterations = b.option(u64, "iterations", "The max fuzz iterations (default: 100)") orelse 100;
|
||||
const fuzz_iterations_arg = std.fmt.allocPrint(b.allocator, "{}", .{fuzz_max_iterations}) catch @panic("oom");
|
||||
|
||||
|
||||
@@ -28,8 +28,6 @@ pub fn build(b: *std.Build) !void {
|
||||
}),
|
||||
});
|
||||
|
||||
test_exe.root_module.linkSystemLibrary("advapi32", .{});
|
||||
|
||||
const run = b.addRunArtifact(test_exe);
|
||||
run.addArtifactArg(echo_args);
|
||||
run.expectExitCode(0);
|
||||
@@ -46,8 +44,6 @@ pub fn build(b: *std.Build) !void {
|
||||
}),
|
||||
});
|
||||
|
||||
fuzz.root_module.linkSystemLibrary("advapi32", .{});
|
||||
|
||||
const fuzz_max_iterations = b.option(u64, "iterations", "The max fuzz iterations (default: 100)") orelse 100;
|
||||
const fuzz_iterations_arg = std.fmt.allocPrint(b.allocator, "{}", .{fuzz_max_iterations}) catch @panic("oom");
|
||||
|
||||
|
||||
@@ -28,8 +28,6 @@ pub fn build(b: *std.Build) void {
|
||||
}),
|
||||
});
|
||||
|
||||
main.root_module.linkSystemLibrary("advapi32", .{});
|
||||
|
||||
const run = b.addRunArtifact(main);
|
||||
run.addArtifactArg(hello);
|
||||
run.expectExitCode(0);
|
||||
|
||||
@@ -2238,7 +2238,6 @@ const ModuleTestOptions = struct {
|
||||
desc: []const u8,
|
||||
optimize_modes: []const OptimizeMode,
|
||||
include_paths: []const []const u8,
|
||||
windows_libs: []const []const u8,
|
||||
skip_single_threaded: bool,
|
||||
skip_non_native: bool,
|
||||
skip_freebsd: bool,
|
||||
@@ -2373,10 +2372,6 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step {
|
||||
|
||||
for (options.include_paths) |include_path| these_tests.root_module.addIncludePath(b.path(include_path));
|
||||
|
||||
if (target.os.tag == .windows) {
|
||||
for (options.windows_libs) |lib| these_tests.root_module.linkSystemLibrary(lib, .{});
|
||||
}
|
||||
|
||||
const qualified_name = b.fmt("{s}-{s}-{s}-{s}{s}{s}{s}{s}{s}{s}", .{
|
||||
options.name,
|
||||
triple_txt,
|
||||
@@ -2672,10 +2667,6 @@ pub fn addIncrementalTests(b: *std.Build, test_step: *Step) !void {
|
||||
}),
|
||||
});
|
||||
|
||||
if (b.graph.host.result.os.tag == .windows) {
|
||||
incr_check.root_module.linkSystemLibrary("advapi32", .{});
|
||||
}
|
||||
|
||||
var dir = try b.build_root.handle.openDir("test/incremental", .{ .iterate = true });
|
||||
defer dir.close();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user