stage2: add zig ar subcommand
The same entrypoint supports the following commands: * ar * ranlib * dlltool * lib For now, our strategy is to bundle the (renamed) `main()` function of llvm-ar, same as our strategy for `zig clang`. However, as Zig matures, a goal will be to replace the dependency on LLVM with our own implementation of this tool, so that it is available in builds of zig that do not have LLVM extensions enabled. This commit also categorizes the subcommands into categories in the --help menu.
This commit is contained in:
@@ -1260,7 +1260,8 @@ static int ranlib_main(int argc, char **argv) {
|
||||
return performOperation(CreateSymTab, nullptr);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
extern "C" int ZigLlvmAr_main(int argc, char **argv);
|
||||
int ZigLlvmAr_main(int argc, char **argv) {
|
||||
InitLLVM X(argc, argv);
|
||||
ToolName = argv[0];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user