aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/linkers.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2020-01-12 19:02:26 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2020-01-22 19:34:05 +0530
commitb293852d079f2ef873f757d72739e9e79195c1ec (patch)
treeea94fdb9f63a6a9b57438ea84c9420a7fd41317a /mesonbuild/linkers.py
parent89b132f24021e81bfb3dcdbee2cac368ed677f79 (diff)
downloadmeson-b293852d079f2ef873f757d72739e9e79195c1ec.zip
meson-b293852d079f2ef873f757d72739e9e79195c1ec.tar.gz
meson-b293852d079f2ef873f757d72739e9e79195c1ec.tar.bz2
vs: Write checksums in PE binaries (DLLs and EXEs)
This is needed for detecting data corruption, and its absence (or an incorrect value) is also used as a hint by anti-viruses that the binary may be malware. Flag is only supported by MSVC `link.exe`, not `lld-link.exe` https://docs.microsoft.com/en-us/cpp/build/reference/release-set-the-checksum
Diffstat (limited to 'mesonbuild/linkers.py')
-rw-r--r--mesonbuild/linkers.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/linkers.py b/mesonbuild/linkers.py
index a60248b..0a5c57e 100644
--- a/mesonbuild/linkers.py
+++ b/mesonbuild/linkers.py
@@ -845,6 +845,9 @@ class MSVCDynamicLinker(VisualStudioLikeLinkerMixin, DynamicLinker):
super().__init__(exelist or ['link.exe'], for_machine, 'link',
prefix, always_args, machine=machine, version=version, direct=direct)
+ def get_always_args(self) -> T.List[str]:
+ return self._apply_prefix(['/nologo', '/release']) + super().get_always_args()
+
class ClangClDynamicLinker(VisualStudioLikeLinkerMixin, DynamicLinker):