Update toolchain configuration artifacts to work with latest version of bazel
PiperOrigin-RevId: 161531749
This commit is contained in:
parent
ba45775be0
commit
18a5510e67
2
third_party/gpus/cuda/BUILD.tpl
vendored
2
third_party/gpus/cuda/BUILD.tpl
vendored
@ -152,6 +152,7 @@ cc_library(
|
||||
|
||||
cc_library(
|
||||
name = "cuda",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":cublas",
|
||||
":cuda_headers",
|
||||
@ -160,7 +161,6 @@ cc_library(
|
||||
":cufft",
|
||||
":curand",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
|
16
third_party/py/BUILD.tpl
vendored
16
third_party/py/BUILD.tpl
vendored
@ -5,16 +5,16 @@ package(default_visibility = ["//visibility:public"])
|
||||
cc_library(
|
||||
name = "python_headers",
|
||||
hdrs = [":python_include"],
|
||||
includes = ["python_include"],
|
||||
data = select({
|
||||
":windows" : [":python_import_lib"],
|
||||
"//conditions:default": [],
|
||||
":windows": [":python_import_lib"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
includes = ["python_include"],
|
||||
linkopts = select({
|
||||
# TODO(pcloudy): Ideally, this should just go into deps after resolving
|
||||
# https://github.com/bazelbuild/bazel/issues/3237,
|
||||
":windows" : ["$(locations :python_import_lib)"],
|
||||
"//conditions:default": [],
|
||||
# TODO(pcloudy): Ideally, this should just go into deps after resolving
|
||||
# https://github.com/bazelbuild/bazel/issues/3237,
|
||||
":windows": ["$(locations :python_import_lib)"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
)
|
||||
|
||||
@ -31,5 +31,5 @@ config_setting(
|
||||
)
|
||||
|
||||
%{PYTHON_INCLUDE_GENRULE}
|
||||
%{PYTHON_IMPORT_LIB_GENRULE}
|
||||
%{NUMPY_INCLUDE_GENRULE}
|
||||
%{PYTHON_IMPORT_LIB_GENRULE}
|
||||
|
118
third_party/toolchains/cpus/CROSSTOOL
vendored
118
third_party/toolchains/cpus/CROSSTOOL
vendored
@ -185,7 +185,10 @@ toolchain {
|
||||
flag_group {
|
||||
flag: '-fprofile-arcs'
|
||||
flag: '-ftest-coverage'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
flag_set {
|
||||
action: 'c++-link-interface-dynamic-library'
|
||||
@ -193,10 +196,9 @@ toolchain {
|
||||
action: 'c++-link-executable'
|
||||
flag_group {
|
||||
flag: '-lgcov'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
toolchain {
|
||||
@ -215,15 +217,15 @@ toolchain {
|
||||
|
||||
tool_path {
|
||||
name: "ar"
|
||||
path: "wrapper/bin/msvc_link.bat"
|
||||
path: ""
|
||||
}
|
||||
tool_path {
|
||||
name: "cpp"
|
||||
path: "wrapper/bin/msvc_cl.bat"
|
||||
path: ""
|
||||
}
|
||||
tool_path {
|
||||
name: "gcc"
|
||||
path: "wrapper/bin/msvc_cl.bat"
|
||||
path: ""
|
||||
}
|
||||
tool_path {
|
||||
name: "gcov"
|
||||
@ -231,7 +233,7 @@ toolchain {
|
||||
}
|
||||
tool_path {
|
||||
name: "ld"
|
||||
path: "wrapper/bin/msvc_link.bat"
|
||||
path: ""
|
||||
}
|
||||
tool_path {
|
||||
name: "nm"
|
||||
@ -285,8 +287,6 @@ toolchain {
|
||||
compiler_flag: "/Gy"
|
||||
# Use string pooling.
|
||||
compiler_flag: "/GF"
|
||||
# Warning level 3 (could possibly go to 4 in the future).
|
||||
compiler_flag: "/W3"
|
||||
# Catch both asynchronous (structured) and synchronous (C++) exceptions.
|
||||
compiler_flag: "/EHsc"
|
||||
|
||||
@ -304,6 +304,10 @@ toolchain {
|
||||
|
||||
linker_flag: "/SUBSYSTEM:CONSOLE"
|
||||
|
||||
feature {
|
||||
name: "no_legacy_features"
|
||||
}
|
||||
|
||||
# Suppress startup banner.
|
||||
feature {
|
||||
name: "nologo"
|
||||
@ -364,6 +368,18 @@ toolchain {
|
||||
}
|
||||
}
|
||||
|
||||
feature {
|
||||
name: "use_linker"
|
||||
env_set {
|
||||
action: "c++-link-executable"
|
||||
action: "c++-link-dynamic-library"
|
||||
env_entry {
|
||||
key: "USE_LINKER"
|
||||
value: "1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
feature {
|
||||
name: 'include_paths'
|
||||
flag_set {
|
||||
@ -425,7 +441,7 @@ toolchain {
|
||||
config_name: 'c-compile'
|
||||
action_name: 'c-compile'
|
||||
tool {
|
||||
tool_path: 'wrapper/bin/msvc_cl.bat'
|
||||
tool_path: ''
|
||||
}
|
||||
flag_set {
|
||||
flag_group {
|
||||
@ -461,7 +477,7 @@ toolchain {
|
||||
config_name: 'c++-compile'
|
||||
action_name: 'c++-compile'
|
||||
tool {
|
||||
tool_path: 'wrapper/bin/msvc_cl.bat'
|
||||
tool_path: ''
|
||||
}
|
||||
flag_set {
|
||||
flag_group {
|
||||
@ -497,26 +513,25 @@ toolchain {
|
||||
config_name: 'c++-link-executable'
|
||||
action_name: 'c++-link-executable'
|
||||
tool {
|
||||
tool_path: 'wrapper/bin/msvc_link.bat'
|
||||
tool_path: ''
|
||||
}
|
||||
implies: 'nologo'
|
||||
implies: 'strip_debug_symbols'
|
||||
implies: 'linkstamps'
|
||||
implies: 'output_execpath_flags'
|
||||
implies: 'input_param_flags'
|
||||
implies: 'legacy_link_flags'
|
||||
implies: 'linker_param_file'
|
||||
implies: 'msvc_env'
|
||||
implies: 'use_linker'
|
||||
}
|
||||
|
||||
action_config {
|
||||
config_name: 'c++-link-dynamic-library'
|
||||
action_name: 'c++-link-dynamic-library'
|
||||
tool {
|
||||
tool_path: 'wrapper/bin/msvc_link.bat'
|
||||
tool_path: ''
|
||||
}
|
||||
implies: 'nologo'
|
||||
implies: 'strip_debug_symbols'
|
||||
implies: 'shared_flag'
|
||||
implies: 'linkstamps'
|
||||
implies: 'output_execpath_flags'
|
||||
@ -525,15 +540,17 @@ toolchain {
|
||||
implies: 'legacy_link_flags'
|
||||
implies: 'linker_param_file'
|
||||
implies: 'msvc_env'
|
||||
implies: 'use_linker'
|
||||
}
|
||||
|
||||
action_config {
|
||||
config_name: 'c++-link-static-library'
|
||||
action_name: 'c++-link-static-library'
|
||||
tool {
|
||||
tool_path: 'wrapper/bin/msvc_link.bat'
|
||||
tool_path: ''
|
||||
}
|
||||
implies: 'nologo'
|
||||
implies: 'archiver_flags'
|
||||
implies: 'input_param_flags'
|
||||
implies: 'linker_param_file'
|
||||
implies: 'msvc_env'
|
||||
@ -543,9 +560,10 @@ toolchain {
|
||||
config_name: 'c++-link-alwayslink-static-library'
|
||||
action_name: 'c++-link-alwayslink-static-library'
|
||||
tool {
|
||||
tool_path: 'wrapper/bin/msvc_link.bat'
|
||||
tool_path: ''
|
||||
}
|
||||
implies: 'nologo'
|
||||
implies: 'archiver_flags'
|
||||
implies: 'input_param_flags'
|
||||
implies: 'linker_param_file'
|
||||
implies: 'msvc_env'
|
||||
@ -557,9 +575,10 @@ toolchain {
|
||||
config_name: 'c++-link-pic-static-library'
|
||||
action_name: 'c++-link-pic-static-library'
|
||||
tool {
|
||||
tool_path: 'wrapper/bin/msvc_link.bat'
|
||||
tool_path: ''
|
||||
}
|
||||
implies: 'nologo'
|
||||
implies: 'archiver_flags'
|
||||
implies: 'input_param_flags'
|
||||
implies: 'linker_param_file'
|
||||
implies: 'msvc_env'
|
||||
@ -569,9 +588,10 @@ toolchain {
|
||||
config_name: 'c++-link-alwayslink-pic-static-library'
|
||||
action_name: 'c++-link-alwayslink-pic-static-library'
|
||||
tool {
|
||||
tool_path: 'wrapper/bin/msvc_link.bat'
|
||||
tool_path: ''
|
||||
}
|
||||
implies: 'nologo'
|
||||
implies: 'archiver_flags'
|
||||
implies: 'input_param_flags'
|
||||
implies: 'linker_param_file'
|
||||
implies: 'msvc_env'
|
||||
@ -581,10 +601,9 @@ toolchain {
|
||||
config_name: 'c++-link-interface-dynamic-library'
|
||||
action_name: 'c++-link-interface-dynamic-library'
|
||||
tool {
|
||||
tool_path: 'wrapper/bin/msvc_link.bat'
|
||||
tool_path: ''
|
||||
}
|
||||
implies: 'nologo'
|
||||
implies: 'strip_debug_symbols'
|
||||
implies: 'linker_param_file'
|
||||
implies: 'msvc_env'
|
||||
}
|
||||
@ -603,19 +622,6 @@ toolchain {
|
||||
name: 'has_configured_linker_path'
|
||||
}
|
||||
|
||||
feature {
|
||||
name: 'strip_debug_symbols'
|
||||
flag_set {
|
||||
action: 'c++-link-executable'
|
||||
action: 'c++-link-dynamic-library'
|
||||
action: 'c++-link-interface-dynamic-library'
|
||||
flag_group {
|
||||
expand_if_all_available: 'strip_debug_symbols'
|
||||
flag: '-Wl,-S'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
feature {
|
||||
name: 'shared_flag'
|
||||
flag_set {
|
||||
@ -651,16 +657,26 @@ toolchain {
|
||||
}
|
||||
}
|
||||
|
||||
feature {
|
||||
name: 'archiver_flags'
|
||||
flag_set {
|
||||
expand_if_all_available: 'output_execpath'
|
||||
action: 'c++-link-static-library'
|
||||
action: 'c++-link-alwayslink-static-library'
|
||||
action: 'c++-link-pic-static-library'
|
||||
action: 'c++-link-alwayslink-pic-static-library'
|
||||
flag_group {
|
||||
flag: '/OUT:%{output_execpath}'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
feature {
|
||||
name: 'input_param_flags'
|
||||
flag_set {
|
||||
expand_if_all_available: 'library_search_directories'
|
||||
action: 'c++-link-executable'
|
||||
action: 'c++-link-dynamic-library'
|
||||
action: 'c++-link-static-library'
|
||||
action: 'c++-link-alwayslink-static-library'
|
||||
action: 'c++-link-pic-static-library'
|
||||
action: 'c++-link-alwayslink-pic-static-library'
|
||||
flag_group {
|
||||
iterate_over: 'library_search_directories'
|
||||
flag: "-L%{library_search_directories}"
|
||||
@ -670,10 +686,6 @@ toolchain {
|
||||
expand_if_all_available: 'libopts'
|
||||
action: 'c++-link-executable'
|
||||
action: 'c++-link-dynamic-library'
|
||||
action: 'c++-link-static-library'
|
||||
action: 'c++-link-alwayslink-static-library'
|
||||
action: 'c++-link-pic-static-library'
|
||||
action: 'c++-link-alwayslink-pic-static-library'
|
||||
flag_group {
|
||||
iterate_over: 'libopts'
|
||||
flag: '%{libopts}'
|
||||
@ -787,12 +799,6 @@ toolchain {
|
||||
expand_if_all_available: 'linker_param_file'
|
||||
action: 'c++-link-executable'
|
||||
action: 'c++-link-dynamic-library'
|
||||
flag_group {
|
||||
flag: '-Wl,@%{linker_param_file}'
|
||||
}
|
||||
}
|
||||
flag_set {
|
||||
expand_if_all_available: 'linker_param_file'
|
||||
action: 'c++-link-static-library'
|
||||
action: 'c++-link-alwayslink-static-library'
|
||||
action: 'c++-link-pic-static-library'
|
||||
@ -907,22 +913,6 @@ toolchain {
|
||||
implies: 'link_crt_library'
|
||||
}
|
||||
|
||||
compilation_mode_flags {
|
||||
mode: DBG
|
||||
compiler_flag: "-Xcompilation-mode=dbg"
|
||||
linker_flag: "-Xcompilation-mode=dbg"
|
||||
}
|
||||
|
||||
compilation_mode_flags {
|
||||
mode: FASTBUILD
|
||||
compiler_flag: "-Xcompilation-mode=fastbuild"
|
||||
linker_flag: "-Xcompilation-mode=fastbuild"
|
||||
}
|
||||
|
||||
compilation_mode_flags {
|
||||
mode: OPT
|
||||
compiler_flag: "-Xcompilation-mode=opt"
|
||||
linker_flag: "-Xcompilation-mode=opt"
|
||||
}
|
||||
|
||||
}
|
||||
|
16
third_party/toolchains/cpus/py/BUILD
vendored
16
third_party/toolchains/cpus/py/BUILD
vendored
File diff suppressed because one or more lines are too long
28
third_party/toolchains/gpus/cuda/BUILD
vendored
28
third_party/toolchains/gpus/cuda/BUILD
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user