Compilation: take into account if LLVM is available in lib-building logic

This commit is contained in:
Jakub Konka 2023-11-04 16:09:52 +01:00
parent 533c88158e
commit 7a186d9eb6

View File

@ -6243,11 +6243,9 @@ fn canBuildLibCompilerRt(target: std.Target, use_llvm: bool) bool {
else => {},
}
return switch (zigBackend(target, use_llvm)) {
.stage2_llvm,
.stage2_x86_64,
=> true,
else => false,
.stage2_llvm => true,
.stage2_x86_64 => if (target.ofmt == .elf) true else build_options.have_llvm,
else => build_options.have_llvm,
};
}
@ -6262,7 +6260,7 @@ fn canBuildLibSsp(target: std.Target, use_llvm: bool) bool {
}
return switch (zigBackend(target, use_llvm)) {
.stage2_llvm => true,
else => false,
else => build_options.have_llvm,
};
}
@ -6278,11 +6276,9 @@ fn canBuildZigLibC(target: std.Target, use_llvm: bool) bool {
else => {},
}
return switch (zigBackend(target, use_llvm)) {
.stage2_llvm,
.stage2_x86_64,
=> true,
else => false,
.stage2_llvm => true,
.stage2_x86_64 => if (target.ofmt == .elf) true else build_options.have_llvm,
else => build_options.have_llvm,
};
}