From: Michael D. Lowis Date: Wed, 22 Oct 2014 14:49:34 +0000 (-0400) Subject: Added compiler mode for compiling object files X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=629b8cd61926a545bdd96a3d72d958ed28f728b8;p=proto%2Fsclpl.git Added compiler mode for compiling object files --- diff --git a/source/sclpl/main.c b/source/sclpl/main.c index 985cc8d..9d8de8a 100644 --- a/source/sclpl/main.c +++ b/source/sclpl/main.c @@ -19,6 +19,7 @@ opts_cfg_t Options_Config[] = { {"ast", false, "mode", "Emit the abstract syntax tree for the given file"}, {"csource", false, "mode", "Emit the intermediate C source file for the given file"}, {"repl", false, "mode", "Execute the application in a REPL"}, + {"object", false, "mode", "Compile the source as an object file"}, {"staticlib", false, "mode", "Compile the application as a static library"}, {"sharedlib", false, "mode", "Compile the application as a shared library"}, {"program", false, "mode", "Compile the application as an executable"}, @@ -269,6 +270,10 @@ static int exec_repl(void) { return 0; } +static int emit_object(void) { + return 0; +} + static int emit_staticlib(void) { return 0; } @@ -304,6 +309,8 @@ int main(int argc, char **argv) { return emit_tree(); } else if (opts_equal(NULL, "mode", "csource")) { return emit_csource(); + } else if (opts_equal(NULL, "mode", "object")) { + return emit_object(); } else if (opts_equal(NULL, "mode", "staticlib")) { return emit_staticlib(); } else if (opts_equal(NULL, "mode", "sharedlib")) {