aboutsummaryrefslogtreecommitdiff
path: root/src/link.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-07-21 12:45:32 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-07-21 12:45:32 -0700
commit36295d712fbd561c3de9b3eb46e776d63e646e9a (patch)
tree9fadd735b548a1d2d2282e9abe0a30b57e21e728 /src/link.zig
parent26984852bdfdbe3564b19f3ff7b3ecfd606c9902 (diff)
downloadzig-36295d712fbd561c3de9b3eb46e776d63e646e9a.tar.gz
zig-36295d712fbd561c3de9b3eb46e776d63e646e9a.zip
remove 'pe' object format
Portable Executable is an executable format, not an object format. Everywhere in the entire zig codebase, we treated coff and pe as if they were the same. Remove confusion by not including pe in the std.Target.ObjectFormat enum.
Diffstat (limited to 'src/link.zig')
-rw-r--r--src/link.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/link.zig b/src/link.zig
index 2403180ec8..562896d14c 100644
--- a/src/link.zig
+++ b/src/link.zig
@@ -191,7 +191,7 @@ pub const File = struct {
const use_stage1 = build_options.is_stage1 and options.use_stage1;
if (use_stage1 or options.emit == null) {
return switch (options.object_format) {
- .coff, .pe => &(try Coff.createEmpty(allocator, options)).base,
+ .coff => &(try Coff.createEmpty(allocator, options)).base,
.elf => &(try Elf.createEmpty(allocator, options)).base,
.macho => &(try MachO.createEmpty(allocator, options)).base,
.wasm => &(try Wasm.createEmpty(allocator, options)).base,
@@ -208,7 +208,7 @@ pub const File = struct {
if (options.module == null) {
// No point in opening a file, we would not write anything to it. Initialize with empty.
return switch (options.object_format) {
- .coff, .pe => &(try Coff.createEmpty(allocator, options)).base,
+ .coff => &(try Coff.createEmpty(allocator, options)).base,
.elf => &(try Elf.createEmpty(allocator, options)).base,
.macho => &(try MachO.createEmpty(allocator, options)).base,
.plan9 => &(try Plan9.createEmpty(allocator, options)).base,
@@ -225,7 +225,7 @@ pub const File = struct {
errdefer if (use_lld) allocator.free(sub_path);
const file: *File = switch (options.object_format) {
- .coff, .pe => &(try Coff.openPath(allocator, sub_path, options)).base,
+ .coff => &(try Coff.openPath(allocator, sub_path, options)).base,
.elf => &(try Elf.openPath(allocator, sub_path, options)).base,
.macho => &(try MachO.openPath(allocator, sub_path, options)).base,
.plan9 => &(try Plan9.openPath(allocator, sub_path, options)).base,