[PATCH] D112093: Fixes majorOSVersion and majorSubsystemVersion being set into too large values

KOLANICH via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 27 00:03:16 PDT 2021


KOLANICH added a comment.

> you can always set a lower target if you want to, by passing e.g. `--major-os-version 4` to the linker.

Thanks for the info, I'll incorporate that in my CMake toolchain fikes.

About `6.0` being reasanoble or not. I think that we should keep it as low as possible, otherwise it would create issues for the users of of old OSes out of thin air. Defaults rule the world, so if we set the version too high the majority of software would become incompatible to XP even if it is de-facto compatible. I think that instead of lowering the version on per-target-basis it should be increased on per-target-basis, when a linker is completely sure that the runtime is incompatible to the OS. It can do it by examining the fields within the libs it links an executable to, including C runtime libs.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112093/new/

https://reviews.llvm.org/D112093



More information about the llvm-commits mailing list