diff options
| author | Michael Dusan <michael.dusan@gmail.com> | 2021-05-16 15:59:34 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-05-23 15:38:57 -0400 |
| commit | 0f2612037784570930dea433afef559ff6161b21 (patch) | |
| tree | d60fbc768c7460ac6874ed937eac38f8fe345842 /src/target.zig | |
| parent | 44e480aa2cef24a0a9edbc5d24991f9432a255e3 (diff) | |
| download | zig-0f2612037784570930dea433afef559ff6161b21.tar.gz zig-0f2612037784570930dea433afef559ff6161b21.zip | |
overhaul elf csu (c-runtime startup) logic
- more support for linux, android, freebsd, netbsd, openbsd, dragonfly
- centralize musl utils; musl logic is no longer intertwined with csu
- fix musl compilation to build crti/crtn for full archs list
- fix openbsd to support `zig build-lib -dynamic`
- initial dragonfly linking success (with a warning)
ancillary:
- fix emutls (openbsd) tests to use `try`
Diffstat (limited to 'src/target.zig')
| -rw-r--r-- | src/target.zig | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/target.zig b/src/target.zig index 35c3cd8560..e077d9629c 100644 --- a/src/target.zig +++ b/src/target.zig @@ -99,23 +99,6 @@ pub fn libCGenericName(target: std.Target) [:0]const u8 { } } -pub fn archMuslName(arch: std.Target.Cpu.Arch) [:0]const u8 { - switch (arch) { - .aarch64, .aarch64_be => return "aarch64", - .arm, .armeb, .thumb, .thumbeb => return "arm", - .mips, .mipsel => return "mips", - .mips64el, .mips64 => return "mips64", - .powerpc => return "powerpc", - .powerpc64, .powerpc64le => return "powerpc64", - .s390x => return "s390x", - .i386 => return "i386", - .x86_64 => return "x86_64", - .riscv64 => return "riscv64", - .wasm32, .wasm64 => return "wasm", - else => unreachable, - } -} - pub fn canBuildLibC(target: std.Target) bool { for (available_libcs) |libc| { if (target.cpu.arch == libc.arch and target.os.tag == libc.os and target.abi == libc.abi) { @@ -172,10 +155,6 @@ pub fn supports_fpic(target: std.Target) bool { return target.os.tag != .windows; } -pub fn libc_needs_crti_crtn(target: std.Target) bool { - return !(target.cpu.arch.isRISCV() or target.isAndroid() or target.os.tag == .openbsd); -} - pub fn isSingleThreaded(target: std.Target) bool { return target.isWasm(); } |
