Adds an option to msbuild common configuration to ignore linker warning 4221. This warning is for object files that do not include any symbols. The warning is harmless and occurs due to some classes that are *nix only having no source to compile for an msvc build.
msbuild: Ignore linker warning #16746
pull sipsorcery wants to merge 1 commits into bitcoin:master from sipsorcery:msvc_ignore_4221 changing 1 files +3 −0-
sipsorcery commented at 8:06 PM on August 28, 2019: member
-
Adds an option to msbuild common configuration to ignore linker warning 4221. This warning is for object files that do not include any symbols. The warning is harmless and occurs due to some classes that are *nix only having no source to compile for an msvc build. aff1c9c884
-
MarcoFalke commented at 8:17 PM on August 28, 2019: member
ACK aff1c9c8845e7762e9710008998555a72045e40c
-
hebasto commented at 8:26 PM on August 28, 2019: member
The warning is harmless and occurs due to some classes that are *nix only having no source to compile for an msvc build.
Is conditional compilation an alternative?
-
sipsorcery commented at 8:55 PM on August 28, 2019: member
Is conditional compilation an alternative?
Yes. But it would require some additional python script gymnastics. The libbitcoin_common.vcxproj file is generated automatically based on the makefile. To add a condition on a specific class file would require customising the script. Not that hard but could get a bit unwieldy if it was done for every warning.
The msbuild is already disabling a bunch of compiler warnings that are not deemed important:
<DisableSpecificWarnings>4018;4221;4244;4267;4715;4805;</DisableSpecificWarnings>. It seems to make sense to employ the same approach for linker warnings. - hebasto approved
-
hebasto commented at 9:17 PM on August 28, 2019: member
ACK aff1c9c8845e7762e9710008998555a72045e40c, I have reviewed the code, it looks OK and I agree it can be merged.
- fanquake added the label Build system on Aug 28, 2019
- fanquake added the label Windows on Aug 28, 2019
- fanquake approved
-
fanquake commented at 12:01 AM on August 29, 2019: member
ACK aff1c9c8845e7762e9710008998555a72045e40c
- fanquake referenced this in commit 7fbbd6fbd2 on Aug 29, 2019
- fanquake merged this on Aug 29, 2019
- fanquake closed this on Aug 29, 2019
-
NicolasDorier commented at 2:06 AM on August 29, 2019: contributor
Seems ok, but just for info, why you did not add it to
DisableSpecificWarnings? -
sipsorcery commented at 6:05 AM on August 29, 2019: member
Seems ok, but just for info, why you did not add it to
DisableSpecificWarnings?Because it's a linker warning not a compiler one.
- DrahtBot locked this on Dec 16, 2021