From f6c9a60f99897a2d3c05710bbe0aa181ba6021cd Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Thu, 14 Apr 2022 15:04:00 +0300 Subject: [PATCH] pref: only show the support cross compiler warning/VCROSS_COMPILER_NAME message for the C backend --- vlib/v/pref/default.v | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/vlib/v/pref/default.v b/vlib/v/pref/default.v index 120749aedf..91977049f5 100644 --- a/vlib/v/pref/default.v +++ b/vlib/v/pref/default.v @@ -259,8 +259,10 @@ pub fn (p &Preferences) vcross_compiler_name() string { if p.os == .linux { return 'clang' } - 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 .') + if p.backend == .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 .') + } return 'cc' }