From 12265a15edacc06f452ae54b1c05b1375b2def12 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sun, 21 Aug 2022 05:12:58 +0300 Subject: [PATCH] pref: temp hack to make -os cross work when building V --- vlib/v/pref/should_compile.v | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vlib/v/pref/should_compile.v b/vlib/v/pref/should_compile.v index 657e4cfd91..99a977f648 100644 --- a/vlib/v/pref/should_compile.v +++ b/vlib/v/pref/should_compile.v @@ -161,6 +161,10 @@ pub fn (prefs &Preferences) should_compile_c(file string) bool { if prefs.backend != .native && file.ends_with('_native.v') { return false } + if prefs.building_v && prefs.output_cross_c && file.ends_with('_windows.v') { + // TODO temp hack to make msvc_windows.v work with -os cross + return true + } if prefs.os == .windows && (file.ends_with('_nix.c.v') || file.ends_with('_nix.v')) { return false }