From 11551aaf6b18c43b741817be0f5764a08521353c Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Fri, 11 Oct 2024 13:38:51 +0300 Subject: [PATCH] v.builder: add support for `-ldflags ""` when using `-cc msvc` too (#22486) --- 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 1e82c8e1e8..7bf0c36aa6 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