std: enable real start code always for LLVM backend

This commit is contained in:
Andrew Kelley 2022-05-02 14:59:03 -07:00
parent 098bee0e56
commit 1a1f62a0ce
4 changed files with 4 additions and 6 deletions

View File

@ -29,9 +29,7 @@ comptime {
builtin.zig_backend == .stage2_aarch64 or builtin.zig_backend == .stage2_aarch64 or
builtin.zig_backend == .stage2_arm or builtin.zig_backend == .stage2_arm or
builtin.zig_backend == .stage2_riscv64 or builtin.zig_backend == .stage2_riscv64 or
builtin.zig_backend == .stage2_sparcv9 or builtin.zig_backend == .stage2_sparcv9)
(builtin.zig_backend == .stage2_llvm and native_os != .linux and native_os != .macos) or
(builtin.zig_backend == .stage2_llvm and native_arch != .x86_64 and native_arch != .aarch64))
{ {
if (builtin.output_mode == .Exe) { if (builtin.output_mode == .Exe) {
if ((builtin.link_libc or builtin.object_format == .c) and @hasDecl(root, "main")) { if ((builtin.link_libc or builtin.object_format == .c) and @hasDecl(root, "main")) {

View File

@ -2,4 +2,4 @@
// output_mode=Exe // output_mode=Exe
// target=aarch64-macos // target=aarch64-macos
// //
// :109:9: error: struct 'tmp.tmp' has no member named 'main' // :107:9: error: struct 'tmp.tmp' has no member named 'main'

View File

@ -2,4 +2,4 @@
// output_mode=Exe // output_mode=Exe
// target=x86_64-linux // target=x86_64-linux
// //
// :109:9: error: struct 'tmp.tmp' has no member named 'main' // :107:9: error: struct 'tmp.tmp' has no member named 'main'

View File

@ -2,4 +2,4 @@
// output_mode=Exe // output_mode=Exe
// target=x86_64-macos // target=x86_64-macos
// //
// :109:9: error: struct 'tmp.tmp' has no member named 'main' // :107:9: error: struct 'tmp.tmp' has no member named 'main'