From d27a4bb1ac7c8d8b53fe5c5ddf2a2f971d3b3731 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Fri, 11 Oct 2024 12:48:00 +0300 Subject: [PATCH] v.builder: add support for `-ldflags ""` when using `-cc msvc` too --- vlib/v/builder/msvc_windows.v | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vlib/v/builder/msvc_windows.v b/vlib/v/builder/msvc_windows.v index 1e82c8e1e8c378..7bf0c36aa6c5ba 100644 --- a/vlib/v/builder/msvc_windows.v +++ b/vlib/v/builder/msvc_windows.v @@ -354,6 +354,9 @@ pub fn (mut v Builder) cc_msvc() { if env_ldflags != '' { a << env_ldflags } + if v.pref.ldflags != '' { + a << v.pref.ldflags.trim_space() + } v.dump_c_options(a) args := '\xEF\xBB\xBF' + a.join(' ') // write args to a file so that we dont smash createprocess