diff options
author | 2017-03-31 11:50:19 +0000 | |
---|---|---|
committer | 2017-03-31 17:13:18 +0200 | |
commit | cf8fc7220f31b5e5ea664365c4857402079d9a7b (patch) | |
tree | 28a91531e4f4adc081a8573b6830fe5d80ffb8fc /tools/cpp/CROSSTOOL.tpl | |
parent | 5a787e39fbaae338b970b72ed4cd52f72407e7bd (diff) |
Fix MSVC CROSSTOOL for linking against lib files
1. No need to add /WHOLEARCHIVE option for object files
2. When linking against a .lib file of a dll with /WHOLEARCHIVE option,
the linker produces an error. So strip it in msvc_link.py.
The second point is a temporary workaround to make TF GPU build work,
we'll fix it properly when we figure out how to deal with .lib, .dll,
.pdb files on Windwos.
Fix https://github.com/bazelbuild/bazel/issues/2753
Change-Id: Ia77b67546bfd4f19ceeb0f6ab9ab3b7a598c4fe9
PiperOrigin-RevId: 151811504
Diffstat (limited to 'tools/cpp/CROSSTOOL.tpl')
-rw-r--r-- | tools/cpp/CROSSTOOL.tpl | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/tools/cpp/CROSSTOOL.tpl b/tools/cpp/CROSSTOOL.tpl index 580c7a0ef4..a2bf86b7a1 100644 --- a/tools/cpp/CROSSTOOL.tpl +++ b/tools/cpp/CROSSTOOL.tpl @@ -513,13 +513,8 @@ toolchain { } iterate_over: 'libraries_to_link.object_files' flag_group { - expand_if_false: 'libraries_to_link.is_whole_archive' flag: '%{libraries_to_link.object_files}' } - flag_group { - expand_if_true: 'libraries_to_link.is_whole_archive' - flag: '/WHOLEARCHIVE:%{libraries_to_link.object_files}' - } } flag_group { expand_if_equal: { @@ -527,13 +522,8 @@ toolchain { value: 'object_file' } flag_group { - expand_if_false: 'libraries_to_link.is_whole_archive' flag: '%{libraries_to_link.name}' } - flag_group { - expand_if_true: 'libraries_to_link.is_whole_archive' - flag: '/WHOLEARCHIVE:%{libraries_to_link.name}' - } } flag_group { expand_if_equal: { |