From 5b7e538119496ef6f94d30079cac4bf84bf98131 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sat, 16 Apr 2022 10:46:03 +0300 Subject: [PATCH] v.pref: show the VCROSS_COMPILER_NAME notice only when the output is not a .c file --- vlib/v/pref/default.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/v/pref/default.v b/vlib/v/pref/default.v index 91977049f5..0b7f8b737a 100644 --- a/vlib/v/pref/default.v +++ b/vlib/v/pref/default.v @@ -259,7 +259,7 @@ pub fn (p &Preferences) vcross_compiler_name() string { if p.os == .linux { return 'clang' } - if p.backend == .c { + if p.backend == .c && !p.out_name.ends_with('.c') { eprintln('Note: V can only cross compile to windows and linux for now by default.') eprintln('It will use `cc` as a cross compiler for now, although that will probably fail.') eprintln('Set `VCROSS_COMPILER_NAME` to the name of your cross compiler, for your target OS: $p.os .')