mirror of
https://github.com/ziglang/zig.git
synced 2026-01-10 09:25:11 +00:00
openbsd: crt0.o file is different when build static or dynamic mode
it is a first step for support static *and* dynamic mode for openbsd
This commit is contained in:
parent
8bf5a3a5c1
commit
96e3222796
@ -1441,8 +1441,14 @@ fn linkWithLLD(self: *Elf, comp: *Compilation) !void {
|
||||
|
||||
if (link_in_crt) {
|
||||
const crt1o: []const u8 = o: {
|
||||
if (target.os.tag == .netbsd or target.os.tag == .openbsd) {
|
||||
if (target.os.tag == .netbsd) {
|
||||
break :o "crt0.o";
|
||||
} else if (target.os.tag == .openbsd) {
|
||||
if (self.base.options.link_mode == .Static) {
|
||||
break :o "rcrt0.o";
|
||||
} else {
|
||||
break :o "crt0.o";
|
||||
}
|
||||
} else if (target.isAndroid()) {
|
||||
if (self.base.options.link_mode == .Dynamic) {
|
||||
break :o "crtbegin_dynamic.o";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user