diff --git a/cmd/v/help/default.txt b/cmd/v/help/default.txt index ca9553ee79..dfa5c12ecf 100644 --- a/cmd/v/help/default.txt +++ b/cmd/v/help/default.txt @@ -8,6 +8,7 @@ Examples: v run hello.v Same as above but also run the produced executable immediately after compilation. v -cg run hello.v Same as above, but make debugging easier (in case your program crashes). v -o h.c hello.v Translate `hello.v` to `h.c`. Do not compile further. + v -o - hello.v Translate `hello.v` and output the C source code to stdout. Do not compile further. v watch hello.v Re-does the same compilation, when a source code change is detected. The program is only compiled, not run. diff --git a/vlib/v/builder/compile.v b/vlib/v/builder/compile.v index dacd9b9216..cda440efb9 100644 --- a/vlib/v/builder/compile.v +++ b/vlib/v/builder/compile.v @@ -107,6 +107,9 @@ fn (mut b Builder) run_compiled_executable_and_exit() { if b.pref.only_check_syntax { return } + if b.pref.out_name.ends_with('/-') { + return + } if b.pref.os == .ios { panic('Running iOS apps is not supported yet.') }