Skip to content

Commit 1ba4a0d

Browse files
andrewrkhspak
authored andcommitted
remove upstream support for Zen hobby OS
The new plan to support hobby operating systems is ziglang#3784. And what kind of name is "Zen" anyway? There's already a [Zen programming language](http://zenlang.sourceforge.net/) and that's just confusing.
1 parent d618fe1 commit 1ba4a0d

File tree

7 files changed

+0
-27
lines changed

7 files changed

+0
-27
lines changed

lib/std/os.zig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ pub const linux = @import("os/linux.zig");
3131
pub const uefi = @import("os/uefi.zig");
3232
pub const wasi = @import("os/wasi.zig");
3333
pub const windows = @import("os/windows.zig");
34-
pub const zen = @import("os/zen.zig");
3534

3635
comptime {
3736
assert(@import("std") == std); // std lib tests require --override-lib-dir
@@ -45,7 +44,6 @@ test "" {
4544
_ = uefi;
4645
_ = wasi;
4746
_ = windows;
48-
_ = zen;
4947

5048
_ = @import("os/test.zig");
5149
}
@@ -59,7 +57,6 @@ pub const system = if (builtin.link_libc) std.c else switch (builtin.os) {
5957
.dragonfly => dragonfly,
6058
.wasi => wasi,
6159
.windows => windows,
62-
.zen => zen,
6360
else => struct {},
6461
};
6562

lib/std/target.zig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ pub const Target = union(enum) {
4545
hurd,
4646
wasi,
4747
emscripten,
48-
zen,
4948
uefi,
5049
};
5150

@@ -432,7 +431,6 @@ pub const Target = union(enum) {
432431
.mesa3d,
433432
.contiki,
434433
.amdpal,
435-
.zen,
436434
.hermit,
437435
=> return .eabi,
438436
.openbsd,

src-self-hosted/c_int.zig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ pub const CInt = struct {
105105
.macosx,
106106
.freebsd,
107107
.openbsd,
108-
.zen,
109108
=> switch (cint.id) {
110109
.Short,
111110
.UShort,

src-self-hosted/link.zig

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -304,13 +304,6 @@ fn constructLinkerArgsElf(ctx: *Context) !void {
304304
if (ctx.comp.target != Target.Native) {
305305
try ctx.args.append("--allow-shlib-undefined");
306306
}
307-
308-
if (ctx.comp.target.getOs() == .zen) {
309-
try ctx.args.append("-e");
310-
try ctx.args.append("_start");
311-
312-
try ctx.args.append("--image-base=0x10000000");
313-
}
314307
}
315308

316309
fn addPathJoin(ctx: *Context, dirname: []const u8, basename: []const u8) !void {

src/link.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1831,12 +1831,6 @@ static void construct_linker_job_elf(LinkJob *lj) {
18311831
if (!g->zig_target->is_native) {
18321832
lj->args.append("--allow-shlib-undefined");
18331833
}
1834-
1835-
if (g->zig_target->os == OsZen) {
1836-
lj->args.append("-e");
1837-
lj->args.append("_start");
1838-
lj->args.append("--image-base=0x10000000");
1839-
}
18401834
}
18411835

18421836
static void construct_linker_job_wasm(LinkJob *lj) {

src/target.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ static const Os os_list[] = {
179179
OsHurd,
180180
OsWASI,
181181
OsEmscripten,
182-
OsZen,
183182
OsUefi,
184183
};
185184

@@ -269,7 +268,6 @@ Os target_os_enum(size_t index) {
269268
ZigLLVM_OSType get_llvm_os_type(Os os_type) {
270269
switch (os_type) {
271270
case OsFreestanding:
272-
case OsZen:
273271
return ZigLLVM_UnknownOS;
274272
case OsAnanas:
275273
return ZigLLVM_Ananas;
@@ -425,8 +423,6 @@ const char *target_os_name(Os os_type) {
425423
switch (os_type) {
426424
case OsFreestanding:
427425
return "freestanding";
428-
case OsZen:
429-
return "zen";
430426
case OsUefi:
431427
return "uefi";
432428
case OsAnanas:
@@ -1047,7 +1043,6 @@ uint32_t target_c_type_size_in_bits(const ZigTarget *target, CIntType id) {
10471043
}
10481044
case OsLinux:
10491045
case OsMacOSX:
1050-
case OsZen:
10511046
case OsFreeBSD:
10521047
case OsNetBSD:
10531048
case OsDragonFly:
@@ -1404,7 +1399,6 @@ const char *target_dynamic_linker(const ZigTarget *target) {
14041399
case OsMesa3D:
14051400
case OsContiki:
14061401
case OsAMDPAL:
1407-
case OsZen:
14081402
case OsHermitCore:
14091403
case OsHurd:
14101404
case OsWASI:
@@ -1655,7 +1649,6 @@ ZigLLVM_EnvironmentType target_default_abi(ZigLLVM_ArchType arch, Os os) {
16551649
case OsMesa3D:
16561650
case OsContiki:
16571651
case OsAMDPAL:
1658-
case OsZen:
16591652
case OsHermitCore:
16601653
return ZigLLVM_EABI;
16611654
case OsOpenBSD:

src/target.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ enum Os {
4949
OsHurd,
5050
OsWASI,
5151
OsEmscripten,
52-
OsZen,
5352
OsUefi,
5453
};
5554

0 commit comments

Comments
 (0)