| author | |
| committer | |
| log | 3a2647b7d3b68fe32bab488f1fa8eaa1ec57f31a |
| tree | fd4b38ab1feb288b58ec6588246d2e9c91b942dc |
| parent | 4c70aea460d0cf4a5c1f77ec662837680e272220 |
| signature |
2 files changed, 9 insertions(+), 2 deletions(-)
src/Compilation.zig+2-2| ... | @@ -1795,8 +1795,8 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil | ... | @@ -1795,8 +1795,8 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil |
| 1795 | .{ .glibc_crt_file = .crtn_o }, | 1795 | .{ .glibc_crt_file = .crtn_o }, |
| 1796 | }); | 1796 | }); |
| 1797 | } | 1797 | } |
| 1798 | if (!is_dyn_lib) { | 1798 | if (glibc.needsCrt0(comp.config.output_mode)) |f| { |
| 1799 | try comp.queueJob(.{ .glibc_crt_file = .scrt1_o }); | 1799 | try comp.queueJobs(&.{.{ .glibc_crt_file = f }}); |
| 1800 | } | 1800 | } |
| 1801 | try comp.queueJobs(&[_]Job{ | 1801 | try comp.queueJobs(&[_]Job{ |
| 1802 | .{ .glibc_shared_objects = {} }, | 1802 | .{ .glibc_shared_objects = {} }, |
src/glibc.zig+7| ... | @@ -1357,3 +1357,10 @@ pub fn needsCrtiCrtn(target: std.Target) bool { | ... | @@ -1357,3 +1357,10 @@ pub fn needsCrtiCrtn(target: std.Target) bool { |
| 1357 | else => true, | 1357 | else => true, |
| 1358 | }; | 1358 | }; |
| 1359 | } | 1359 | } |
| 1360 | |||
| 1361 | pub fn needsCrt0(output_mode: std.builtin.OutputMode) ?CrtFile { | ||
| 1362 | return switch (output_mode) { | ||
| 1363 | .Obj, .Lib => null, | ||
| 1364 | .Exe => .scrt1_o, | ||
| 1365 | }; | ||
| 1366 | } |