repl: use the most common compiler

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
pull/14031/head
Vincenzo Palazzo 2022-04-13 14:40:03 +02:00
parent e5809363de
commit 0b36027500
No known key found for this signature in database
GPG Key ID: 8B6DC2B870B80D5F
1 changed files with 4 additions and 1 deletions

View File

@ -543,7 +543,10 @@ fn repl_run_vfile(file string) ?os.Result {
$if trace_repl_temp_files ? { $if trace_repl_temp_files ? {
eprintln('>> repl_run_vfile file: $file') eprintln('>> repl_run_vfile file: $file')
} }
s := os.execute('${os.quoted_path(vexe)} -repl run ${os.quoted_path(file)}') // FIXME: gcc is slower so we could make the check on witch compiler
// is available and pick the best one, but overall the repl should not compiler
// the code, so why not focusing on a real repl?
s := os.execute('${os.quoted_path(vexe)} -repl -cc gcc run ${os.quoted_path(file)}')
if s.exit_code < 0 { if s.exit_code < 0 {
rerror(s.output) rerror(s.output)
return error(s.output) return error(s.output)