| 1 | const builtin = @import("builtin"); |
| 2 | const std = @import("std"); |
| 3 | |
| 4 | const compiler_rt = @import("../compiler_rt.zig"); |
| 5 | const symbol = compiler_rt.symbol; |
| 6 | |
| 7 | /// More operating systems are expected to be added here: |
| 8 | /// |
| 9 | /// * FreeBSD: https://codeberg.org/ziglang/zig/issues/30981 |
| 10 | /// * NetBSD: https://codeberg.org/ziglang/zig/issues/30980 |
| 11 | /// * OpenBSD: https://codeberg.org/ziglang/zig/issues/30982 |
| 12 | const use_zig_start = switch (builtin.target.os.tag) { |
| 13 | .linux, |
| 14 | => !builtin.link_libc, |
| 15 | else => false, |
| 16 | }; |
| 17 | |
| 18 | comptime { |
| 19 | if (use_zig_start) { |
| 20 | _ = @import("elf/auxv.zig"); |
| 21 | _ = @import("elf/tls.zig"); |
| 22 | } |
| 23 | } |