diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-12-12 18:20:43 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-12-13 15:37:52 -0500 |
| commit | 9be5323e93123a3979037997fa40a95b4c985b85 (patch) | |
| tree | 8e6af2db5efc74d21ac7faad5b77c726a7276583 /src/main.zig | |
| parent | 5d3adc568c7f0d4720bbd283337404c3cad86479 (diff) | |
| download | zig-9be5323e93123a3979037997fa40a95b4c985b85.tar.gz zig-9be5323e93123a3979037997fa40a95b4c985b85.zip | |
add `zig objcopy` subcommand
This commit moves the logic from `std.build.InstallRawStep` into `zig
objcopy`. The options here are limited, but we can add features as
needed.
closes #9261
New issues can be opened for specific objcopy flag support.
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.zig b/src/main.zig index 089d806885..9e428a3c3a 100644 --- a/src/main.zig +++ b/src/main.zig @@ -85,6 +85,7 @@ const normal_usage = \\ dlltool Use Zig as a drop-in dlltool.exe \\ lib Use Zig as a drop-in lib.exe \\ ranlib Use Zig as a drop-in ranlib + \\ objcopy Use Zig as a drop-in objcopy \\ \\ env Print lib path, std path, cache directory, and version \\ help Print this help and exit @@ -286,6 +287,8 @@ pub fn mainArgs(gpa: Allocator, arena: Allocator, args: []const []const u8) !voi return cmdBuild(gpa, arena, cmd_args); } else if (mem.eql(u8, cmd, "fmt")) { return cmdFmt(gpa, arena, cmd_args); + } else if (mem.eql(u8, cmd, "objcopy")) { + return @import("objcopy.zig").cmdObjCopy(gpa, arena, cmd_args); } else if (mem.eql(u8, cmd, "libc")) { return cmdLibC(gpa, cmd_args); } else if (mem.eql(u8, cmd, "init-exe")) { |
