authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-02-19 21:51:24-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-02-19 21:51:24-05:00
logef2d237f2fbcca0f16b307dda01287e78363627a
tree367af60484b4e4033fe5e2debf02ebf2653a10ea
parent84f1893c18c4ef12dbe268ed6d11a11966a9d447
signature Commit is signed but in an unrecognized format.

this is not the proper way to support this feature


1 files changed, 0 insertions(+), 8 deletions(-)

lib/std/target.zig-8
......@@ -49,8 +49,6 @@ pub const Target = union(enum) {
4949 other,
5050
5151 pub fn parse(text: []const u8) !Os {
52 if (mem.eql(u8, text, "native")) return builtin.os;
53
5452 const info = @typeInfo(Os);
5553 inline for (info.Enum.fields) |field| {
5654 if (mem.eql(u8, text, field.name)) {
......@@ -152,8 +150,6 @@ pub const Target = union(enum) {
152150 }
153151
154152 pub fn parse(text: []const u8) !Abi {
155 if (mem.eql(u8, text, "native")) return builtin.abi;
156
157153 const info = @typeInfo(Abi);
158154 inline for (info.Enum.fields) |field| {
159155 if (mem.eql(u8, text, field.name)) {
......@@ -582,8 +578,6 @@ pub const Target = union(enum) {
582578 }
583579
584580 pub fn parse(text: []const u8) !Arch {
585 if (mem.eql(u8, text, "native")) return builtin.arch;
586
587581 const info = @typeInfo(Arch);
588582 inline for (info.Enum.fields) |field| {
589583 if (mem.eql(u8, text, field.name)) {
......@@ -727,14 +721,12 @@ pub const Target = union(enum) {
727721 /// * CPU Architecture
728722 /// * Operating System
729723 /// * C ABI (optional)
730 /// "native" can be used for any of the fields.
731724 arch_os_abi: []const u8,
732725
733726 /// Looks like "name+a+b-c-d+e", where "name" is a CPU Model name, "a", "b", and "e"
734727 /// are examples of CPU features to add to the set, and "c" and "d" are examples of CPU features
735728 /// to remove from the set.
736729 /// The default value of `null` means to use the "baseline" feature set.
737 /// "native" can be used to perform CPU introspection.
738730 cpu: ?[]const u8 = null,
739731 };
740732