diff options
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -172,6 +172,10 @@ int main(int argc, char **argv) g_config.use_cuda = 1; g_config.use_cpp = 1; // CUDA implies C++ mode. } + else if (strcmp(arg, "--objc") == 0) + { + g_config.use_objc = 1; + } else if (strcmp(arg, "--check") == 0) { g_config.mode_check = 1; @@ -304,6 +308,10 @@ int main(int argc, char **argv) { temp_source_file = "out.cpp"; } + else if (g_config.use_objc) + { + temp_source_file = "out.m"; + } // Codegen to C/C++/CUDA FILE *out = fopen(temp_source_file, "w"); @@ -362,8 +370,9 @@ int main(int argc, char **argv) // If using cosmocc, it handles these usually, but keeping them is okay for Linux targets snprintf(cmd, sizeof(cmd), "%s %s %s %s %s -o %s %s %s %s -I./src %s", g_config.cc, - g_config.gcc_flags, g_cflags, g_config.is_freestanding ? "-ffreestanding" : "", "", - outfile, temp_source_file, math_flag, thread_flag, g_link_flags); + g_config.gcc_flags, g_cflags, g_config.is_freestanding ? "-ffreestanding" : "", + g_config.quiet ? "-w" : "", outfile, temp_source_file, math_flag, thread_flag, + g_link_flags); if (g_config.verbose) { |
