diff options
| author | Zuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian> | 2026-01-17 16:33:36 +0000 |
|---|---|---|
| committer | Zuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian> | 2026-01-17 16:33:36 +0000 |
| commit | 6b2545224752be74de35166c3dcda9ff5bdb79e3 (patch) | |
| tree | aa2765253769a0a1635d9ffc22738ec6598254c1 /src/main.c | |
| parent | b885629239d04d2860a8853799a3d335d8bec154 (diff) | |
Add C++ interop support.
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -37,7 +37,7 @@ void print_usage() printf(" transpile Transpile to C code only (no compilation)\n"); printf(" lsp Start Language Server\n"); printf("Options:\n"); - printf(" --version Print version information"); + printf(" --version Print version information\n"); printf(" -o <file> Output executable name\n"); printf(" --emit-c Keep generated C file (out.c)\n"); printf(" --freestanding Freestanding mode (no stdlib)\n"); @@ -47,6 +47,7 @@ void print_usage() printf(" -v, --verbose Verbose output\n"); printf(" -q, --quiet Quiet output\n"); printf(" -c Compile only (produce .o)\n"); + printf(" --cpp Use C++ mode.\n"); } int main(int argc, char **argv) @@ -141,6 +142,11 @@ int main(int argc, char **argv) { g_config.is_freestanding = 1; } + else if (strcmp(arg, "--cpp") == 0) + { + strcpy(g_config.cc, "g++"); + g_config.use_cpp = 1; + } else if (strcmp(arg, "--check") == 0) { g_config.mode_check = 1; |
