cmd: add separate command for building ivy source and assembly files

This commit is contained in:
2024-11-02 11:18:38 +00:00
parent 3b7cf3c10c
commit d5c41cbbaa
3 changed files with 17 additions and 1 deletions

View File

@@ -7,7 +7,8 @@ B_COMMAND(CMD_ASSEMBLE, CMD_ROOT)
B_COMMAND_NAME("assemble"); B_COMMAND_NAME("assemble");
B_COMMAND_SHORT_NAME('A'); B_COMMAND_SHORT_NAME('A');
B_COMMAND_DESC( B_COMMAND_DESC(
"assemble one or more Ivy source files into Ivy object files."); "assemble one or more Ivy assembly source files into Ivy "
"object files.");
B_COMMAND_FLAGS(B_COMMAND_SHOW_HELP_BY_DEFAULT); B_COMMAND_FLAGS(B_COMMAND_SHOW_HELP_BY_DEFAULT);
B_COMMAND_HELP_OPTION(); B_COMMAND_HELP_OPTION();

View File

@@ -4,6 +4,7 @@
enum command_id { enum command_id {
CMD_ROOT, CMD_ROOT,
CMD_ASSEMBLE, CMD_ASSEMBLE,
CMD_COMPILE,
CMD_REPL, CMD_REPL,
}; };

14
ivy/cmd/compile.c Normal file
View File

@@ -0,0 +1,14 @@
#include "cmd.h"
#include <blue/cmd.h>
B_COMMAND(CMD_COMPILE, CMD_ROOT)
{
B_COMMAND_NAME("compile");
B_COMMAND_SHORT_NAME('C');
B_COMMAND_DESC(
"compile one or more Ivy source files into Ivy object files.");
B_COMMAND_FLAGS(B_COMMAND_SHOW_HELP_BY_DEFAULT);
B_COMMAND_HELP_OPTION();
}