Commit 03f66825d6

Ben Noordhuis <info@bnoordhuis.nl>
2018-06-29 23:28:42
support --emit in 'test' command
Support the `--emit` switch in `zig --emit asm test file.zig`. The command fails because no tests run (no executable is created) but it emits the requested file. That seems like a good tradeoff.
1 parent f1c56f7
Changed files (1)
src/main.cpp
@@ -924,6 +924,8 @@ int main(int argc, char **argv) {
                     codegen_print_timing_report(g, stdout);
                 return EXIT_SUCCESS;
             } else if (cmd == CmdTest) {
+                codegen_set_emit_file_type(g, emit_file_type);
+
                 ZigTarget native;
                 get_native_target(&native);