mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-05 12:29:08 +08:00
57 lines
2.0 KiB
Diff
57 lines
2.0 KiB
Diff
|
From b41cc93b63c99525e71291424466cdd45d92f770 Mon Sep 17 00:00:00 2001
|
||
|
From: Mikhail Paulyshka <me@mixaill.tk>
|
||
|
Date: Sun, 12 Mar 2017 04:34:10 +0300
|
||
|
Subject: [PATCH] fix CRT linking for static library for MSVC
|
||
|
|
||
|
---
|
||
|
configure.py | 15 +++++++++++++++
|
||
|
src/build-data/cc/msvc.txt | 8 ++++++--
|
||
|
2 files changed, 21 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/configure.py b/configure.py
|
||
|
index faf5120c5..9c545cf5f 100755
|
||
|
--- a/configure.py
|
||
|
+++ b/configure.py
|
||
|
@@ -976,6 +976,21 @@ class CompilerInfo(object):
|
||
|
if flag != None and flag != '' and flag not in abi_link:
|
||
|
abi_link.append(flag)
|
||
|
|
||
|
+ if options.build_shared_lib:
|
||
|
+ if options.with_debug_info:
|
||
|
+ if 'dynamic-debug' in self.mach_abi_linking:
|
||
|
+ abi_link.append(self.mach_abi_linking['dynamic-debug'])
|
||
|
+ else:
|
||
|
+ if 'dynamic' in self.mach_abi_linking:
|
||
|
+ abi_link.append(self.mach_abi_linking['dynamic'])
|
||
|
+ else:
|
||
|
+ if options.with_debug_info:
|
||
|
+ if 'static-debug' in self.mach_abi_linking:
|
||
|
+ abi_link.append(self.mach_abi_linking['static-debug'])
|
||
|
+ else:
|
||
|
+ if 'static' in self.mach_abi_linking:
|
||
|
+ abi_link.append(self.mach_abi_linking['static'])
|
||
|
+
|
||
|
if options.with_coverage_info:
|
||
|
if self.coverage_flags == '':
|
||
|
raise ConfigureError('No coverage handling for %s' % (self.basename))
|
||
|
diff --git a/src/build-data/cc/msvc.txt b/src/build-data/cc/msvc.txt
|
||
|
index c1b820b91..e6182b0fa 100644
|
||
|
--- a/src/build-data/cc/msvc.txt
|
||
|
+++ b/src/build-data/cc/msvc.txt
|
||
|
@@ -53,6 +53,10 @@ default-debug -> "$(LINKER) /DEBUG"
|
||
|
</binary_link_commands>
|
||
|
|
||
|
<mach_abi_linking>
|
||
|
-all -> "/MD /bigobj"
|
||
|
-all-debug -> "/MDd /bigobj"
|
||
|
+all -> "/bigobj"
|
||
|
+all-debug -> "/bigobj"
|
||
|
+static -> "/MT"
|
||
|
+static-debug -> "/MTd"
|
||
|
+dynamic -> "/MD"
|
||
|
+dynamic-debug -> "/MDd"
|
||
|
</mach_abi_linking>
|
||
|
--
|
||
|
2.11.0.windows.1
|
||
|
|