aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Yun Peng <pcloudy@google.com>2016-09-26 12:23:55 +0000
committerGravatar Yun Peng <pcloudy@google.com>2016-09-26 17:48:15 +0000
commitaf552c732fd2ca55cee169383a1d131433fb52a6 (patch)
tree1c60dc0f07a3b4d1100564fc48488f255c6bb2c5 /tools
parent84fa11d2a71ededdc2521ab9acae91ea134a9bbd (diff)
Some changes in MSVC toolchain
These changes could help use build TensorFlow on Windows -- Change-Id: I98962add450da234d5965b091607817e991af383 Reviewed-on: https://bazel-review.googlesource.com/#/c/6270 MOS_MIGRATED_REVID=134266671
Diffstat (limited to 'tools')
-rw-r--r--tools/cpp/CROSSTOOL.tpl3
-rw-r--r--tools/cpp/wrapper/bin/pydir/msvc_link.py5
2 files changed, 6 insertions, 2 deletions
diff --git a/tools/cpp/CROSSTOOL.tpl b/tools/cpp/CROSSTOOL.tpl
index 9ff0cf4b10..740b68cbee 100644
--- a/tools/cpp/CROSSTOOL.tpl
+++ b/tools/cpp/CROSSTOOL.tpl
@@ -297,6 +297,7 @@ toolchain {
compiler_flag: "-g"
compiler_flag: "/Od"
compiler_flag: "-Xcompilation-mode=dbg"
+ linker_flag: "-Xcompilation-mode=dbg"
}
compilation_mode_flags {
@@ -304,6 +305,7 @@ toolchain {
compiler_flag: "/DNDEBUG"
compiler_flag: "/Od"
compiler_flag: "-Xcompilation-mode=fastbuild"
+ linker_flag: "-Xcompilation-mode=fastbuild"
}
compilation_mode_flags {
@@ -311,5 +313,6 @@ toolchain {
compiler_flag: "/DNDEBUG"
compiler_flag: "/O2"
compiler_flag: "-Xcompilation-mode=opt"
+ linker_flag: "-Xcompilation-mode=opt"
}
}
diff --git a/tools/cpp/wrapper/bin/pydir/msvc_link.py b/tools/cpp/wrapper/bin/pydir/msvc_link.py
index 8436f5fbef..b9aa81abb7 100644
--- a/tools/cpp/wrapper/bin/pydir/msvc_link.py
+++ b/tools/cpp/wrapper/bin/pydir/msvc_link.py
@@ -29,11 +29,12 @@ LINKPATTERNS = [
(('-o', '(.+)'), ['/OUT:$PATH0']),
('-B(.+)', []),
('-lpthread', []),
- ('-l(.+)', ['lib$0.so']),
('-L(.+)', ['/LIBPATH:$PATH0']),
('-static', []),
('-shared', ['/DLL']),
- ('-whole-archive', []),
+ # TODO(pcloudy): Make "whole archive" a feature in CROSSTOOL
+ # /WHOLEARCHIVE is supported in Visual Stuido 2015 update 2
+ (('-whole-archive', '(.+)'), ['/WHOLEARCHIVE:$PATH0']),
('-no-whole-archive', []),
('-rdynamic', []),
(r'-Wl,(.+)\.lib', ['$0.lib']),