From bc60b0d1a3cc4b07ac0f855a5061283c85c4d587 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sun, 19 Jun 2022 19:57:52 +0300 Subject: [PATCH] builder: add -c when building object files --- vlib/v/builder/cc.v | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vlib/v/builder/cc.v b/vlib/v/builder/cc.v index 206efe918a..f3a487eb51 100644 --- a/vlib/v/builder/cc.v +++ b/vlib/v/builder/cc.v @@ -299,6 +299,9 @@ fn (mut v Builder) setup_ccompiler_options(ccompiler string) { if v.pref.sanitize { ccoptions.args << '-fsanitize=leak' } + if v.pref.is_o { + ccoptions.args << '-c' + } // ccoptions.shared_postfix = '.so' $if macos {