aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Yun Peng <pcloudy@google.com>2017-05-24 14:46:52 +0200
committerGravatar Irina Iancu <elenairina@google.com>2017-05-26 09:31:27 +0200
commit9aad0153c321110f84e279e2496ab96bf19ab978 (patch)
tree85d89c222fb09b3daeb4f0b8fd88f2effd324f01 /tools
parent255953740813414433eceedc99c2bef3c3f6e307 (diff)
Let MSVC wrapper recongnize -DEFAULTLIB:library option
If MSVC wrapper is removed, users cannot put flags like `-Wl,ws2_32.lib` in linkopts of C++ rules on Windows. Instead, they should do `-DEFAULTLIB:ws2_32.lib`. This change is to make the wrapper script also accpet -DEFAULTLIB:library option. https://msdn.microsoft.com/en-us/library/229a6ysd.aspx Change-Id: I0cf9f5529f833470166488100b70fb497384e083 PiperOrigin-RevId: 156978364
Diffstat (limited to 'tools')
-rw-r--r--tools/cpp/wrapper/bin/pydir/msvc_link.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/cpp/wrapper/bin/pydir/msvc_link.py b/tools/cpp/wrapper/bin/pydir/msvc_link.py
index 79d118d5d0..28a58f727f 100644
--- a/tools/cpp/wrapper/bin/pydir/msvc_link.py
+++ b/tools/cpp/wrapper/bin/pydir/msvc_link.py
@@ -36,6 +36,7 @@ LINKPATTERNS = [
('-no-whole-archive', []),
('-rdynamic', []),
(r'-Wl,(.+)\.lib', ['$0.lib']),
+ (r'-DEFAULTLIB:(.+)', ['/DEFAULTLIB:$0']),
('-Wl,@(.+)', ['$LOAD_PARAMS0']),
('@(.+)', ['$LOAD_PARAMS0']),
('-Wl,-rpath(.+)', []),