From 4688d989a363db65612abe5994041c27df09cd7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Thu, 28 Sep 2023 11:23:02 +0200 Subject: [PATCH] AR: Inhibit warning LNK4221. This warning is generated when linking a *.lib with some empty object files. --- tools/ar | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/ar b/tools/ar index fc794788f6..a353c7c04c 100755 --- a/tools/ar +++ b/tools/ar @@ -33,7 +33,12 @@ case "`echo $CC`" in *d*) exit 1 ;; *x*) exit 1 ;; *q*|*r*) - do_cmd lib -nologo "-OUT:`fixpath $OUTPUT`" `fixpath $@` + # NB: Inhibits warning + # LNK4221: no public symbols found; archive + # member will be inaccessible + # Which is generated when linking a *.lib with some empty + # object files (like eg modules/system/syslog.o). + do_cmd lib -nologo "-ignore:4221" "-OUT:`fixpath $OUTPUT`" `fixpath $@` # Copy *.a file to *.lib to work-around warning D9024. winname="`echo $OUTPUT | sed -e 's/^lib\(.*\)\.a/\1.lib/'`" -- GitLab