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
  1. 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.

  2. 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
  3. MarcoFalke commented at 8:17 PM on August 28, 2019: member

    ACK aff1c9c8845e7762e9710008998555a72045e40c

  4. hebasto commented at 8:26 PM on August 28, 2019: member

    @sipsorcery

    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?

  5. 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.

  6. hebasto approved
  7. 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.

  8. fanquake added the label Build system on Aug 28, 2019
  9. fanquake added the label Windows on Aug 28, 2019
  10. fanquake approved
  11. fanquake commented at 12:01 AM on August 29, 2019: member

    ACK aff1c9c8845e7762e9710008998555a72045e40c

  12. fanquake referenced this in commit 7fbbd6fbd2 on Aug 29, 2019
  13. fanquake merged this on Aug 29, 2019
  14. fanquake closed this on Aug 29, 2019

  15. 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 ?

  16. 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.

  17. DrahtBot locked this on Dec 16, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 03:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me