Fix failing tests and windows link dependencies

This commit is contained in:
Martin Wickham 2021-09-22 14:39:02 -05:00
parent 4782bededa
commit d86678778a
3 changed files with 4 additions and 2 deletions

View file

@ -115,6 +115,7 @@ pub fn build(b: *Builder) !void {
if (target.isWindows() and target.getAbi() == .gnu) {
// LTO is currently broken on mingw, this can be removed when it's fixed.
exe.want_lto = false;
test_stage2.want_lto = false;
}
const exe_options = b.addOptions();
@ -501,6 +502,7 @@ fn addStaticLlvmOptionsToExe(
if (exe.target.getOs().tag == .windows) {
exe.linkSystemLibrary("version");
exe.linkSystemLibrary("uuid");
exe.linkSystemLibrary("ole32");
}
}

View file

@ -26,7 +26,7 @@ pub fn addCases(ctx: *TestContext) !void {
var case = ctx.exe("hello world with updates", linux_x64);
case.addError("", &[_][]const u8{
":95:9: error: struct 'tmp.tmp' has no member named 'main'",
":97:9: error: struct 'tmp.tmp' has no member named 'main'",
});
// Incorrect return type

View file

@ -14,7 +14,7 @@ pub fn addCases(ctx: *TestContext) !void {
{
var case = ctx.exe("darwin hello world with updates", target);
case.addError("", &[_][]const u8{
":95:9: error: struct 'tmp.tmp' has no member named 'main'",
":97:9: error: struct 'tmp.tmp' has no member named 'main'",
});
// Incorrect return type