mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-10-28 19:00:52 +08:00
24 lines
630 B
Zig
24 lines
630 B
Zig
const builtin = @import("builtin");
|
|
const std = @import("std");
|
|
|
|
const compiler_rt = @import("../compiler_rt.zig");
|
|
const symbol = compiler_rt.symbol;
|
|
|
|
/// More operating systems are expected to be added here:
|
|
///
|
|
/// * FreeBSD: https://codeberg.org/ziglang/zig/issues/30981
|
|
/// * NetBSD: https://codeberg.org/ziglang/zig/issues/30980
|
|
/// * OpenBSD: https://codeberg.org/ziglang/zig/issues/30982
|
|
const use_zig_start = switch (builtin.target.os.tag) {
|
|
.linux,
|
|
=> !builtin.link_libc,
|
|
else => false,
|
|
};
|
|
|
|
comptime {
|
|
if (use_zig_start) {
|
|
_ = @import("elf/auxv.zig");
|
|
_ = @import("elf/tls.zig");
|
|
}
|
|
}
|