diff options
author | Yun Peng <pcloudy@google.com> | 2016-09-08 08:35:33 +0000 |
---|---|---|
committer | Yun Peng <pcloudy@google.com> | 2016-09-08 08:44:07 +0000 |
commit | 9ae6de54563bd50f72872a60eadc11a59637b6b3 (patch) | |
tree | a1b2d47724a31ad6bd76567d3cc2b11455c18d4b /tools/cpp/BUILD.static | |
parent | c9b8a1792f9fb1a4002cd5d04cb01b3b6cf7d812 (diff) |
Modify BUILD.static to use cc_toolchain_suite
Fixed #1736
--
MOS_MIGRATED_REVID=132529145
Diffstat (limited to 'tools/cpp/BUILD.static')
-rw-r--r-- | tools/cpp/BUILD.static | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/tools/cpp/BUILD.static b/tools/cpp/BUILD.static index b7fbd70314..32a323ad35 100644 --- a/tools/cpp/BUILD.static +++ b/tools/cpp/BUILD.static @@ -13,27 +13,15 @@ filegroup( srcs = [], ) -# This is the entry point for --crosstool_top. Toolchains are found -# by lopping off the name of --crosstool_top and searching for -# "cc-compiler-${CPU}" in this BUILD file, where CPU is the target CPU -# specified in --cpu. -# -# This file group should include -# * all cc_toolchain targets supported -# * all file groups that said cc_toolchain might refer to, -# including the default_grte_top setting in the CROSSTOOL -# protobuf. - # Hardcoded toolchain, legacy behaviour. -filegroup( +cc_toolchain_suite( name = "toolchain", - srcs = [ - ":cc-compiler-armeabi-v7a", - ":cc-compiler-freebsd", - ":cc-compiler-x64_windows", - ":cc-compiler-x64_windows_msvc", - ":empty", - ], + toolchains = { + "armeabi-v7a|compiler": ":cc-compiler-armeabi-v7a", + "freebsd|compiler": ":cc-compiler-freebsd", + "x64_windows|windows_msys64": ":cc-compiler-x64_windows", + "x64_windows_msvc|cl": ":cc-compiler-x64_windows_msvc", + }, ) cc_toolchain( @@ -105,4 +93,4 @@ filegroup( "wrapper/bin/msvc_*", "wrapper/bin/pydir/msvc*", ]), -)
\ No newline at end of file +) |