v.pref: show the VCROSS_COMPILER_NAME notice only when the output is not a .c file

Delyan Angelov 2022-04-16 10:46:03 +03:00 committed by Jef Roosens
parent 0fd92699e7
commit 2d9d4f86a8
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
1 changed files with 1 additions and 1 deletions

View File

@ -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 .')