authorgravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2023-04-03 14:17:00-04:00
committergravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2023-04-03 15:19:07-04:00
logc91929090db337810aa3b55f9bd26f5fd0af4fff
tree15695c53f48d73622e95e96f18c12edae4c93018
parent821eb595f4bd65d003a2cb499c7953f4f57a4c4a

start: disable extra start logic on various x86_64 subtargets


5 files changed, 10 insertions(+), 4 deletions(-)

lib/std/start.zig+1
...@@ -19,6 +19,7 @@ const start_sym_name = if (native_arch.isMIPS()) "__start" else "_start";...@@ -19,6 +19,7 @@ const start_sym_name = if (native_arch.isMIPS()) "__start" else "_start";
19// self-hosted is capable enough to handle all of the real start.zig logic.19// self-hosted is capable enough to handle all of the real start.zig logic.
20pub const simplified_logic =20pub const simplified_logic =
21 builtin.zig_backend == .stage2_wasm or21 builtin.zig_backend == .stage2_wasm or
22 (builtin.zig_backend == .stage2_x86_64 and (builtin.link_libc or builtin.os.tag == .plan9)) or
22 builtin.zig_backend == .stage2_x86 or23 builtin.zig_backend == .stage2_x86 or
23 builtin.zig_backend == .stage2_aarch64 or24 builtin.zig_backend == .stage2_aarch64 or
24 builtin.zig_backend == .stage2_arm or25 builtin.zig_backend == .stage2_arm or
test/cases/aarch64-macos/hello_world_with_updates.0.zig+1-1
...@@ -2,4 +2,4 @@...@@ -2,4 +2,4 @@
2// output_mode=Exe2// output_mode=Exe
3// target=aarch64-macos3// target=aarch64-macos
4//4//
5// :109:9: error: root struct of file 'tmp' has no member named 'main'5// :110:9: error: root struct of file 'tmp' has no member named 'main'
test/cases/x86_64-linux/hello_world_with_updates.0.zig+4-1
...@@ -2,4 +2,7 @@...@@ -2,4 +2,7 @@
2// output_mode=Exe2// output_mode=Exe
3// target=x86_64-linux3// target=x86_64-linux
4//4//
5// :109:9: error: root struct of file 'tmp' has no member named 'main'5// :604:45: error: root struct of file 'tmp' has no member named 'main'
6// :553:12: note: called from here
7// :503:36: note: called from here
8// :466:17: note: called from here
test/cases/x86_64-macos/hello_world_with_updates.0.zig+1-1
...@@ -2,4 +2,4 @@...@@ -2,4 +2,4 @@
2// output_mode=Exe2// output_mode=Exe
3// target=x86_64-macos3// target=x86_64-macos
4//4//
5// :109:9: error: root struct of file 'tmp' has no member named 'main'5// :110:9: error: root struct of file 'tmp' has no member named 'main'
test/cases/x86_64-windows/hello_world_with_updates.0.zig+3-1
...@@ -2,4 +2,6 @@...@@ -2,4 +2,6 @@
2// output_mode=Exe2// output_mode=Exe
3// target=x86_64-windows3// target=x86_64-windows
4//4//
5// :130:9: error: root struct of file 'tmp' has no member named 'main'5// :604:45: error: root struct of file 'tmp' has no member named 'main'
6// :553:12: note: called from here
7// :389:65: note: called from here