-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Toolchain configs for marketplace.gcr.io/google/rbe-ubuntu16-04, Baze…
…l 3.7.0 (2020/10/21) (#918)
- Loading branch information
1 parent
b47b192
commit 3bac046
Showing
10 changed files
with
5,936 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,165 @@ | ||
# Copyright 2016 The Bazel Authors. All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# This becomes the BUILD file for @local_config_cc// under non-BSD unixes. | ||
|
||
load("@rules_cc//cc:defs.bzl", "cc_toolchain", "cc_toolchain_suite") | ||
load(":armeabi_cc_toolchain_config.bzl", "armeabi_cc_toolchain_config") | ||
load(":cc_toolchain_config.bzl", "cc_toolchain_config") | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
licenses(["notice"]) # Apache 2.0 | ||
|
||
cc_library( | ||
name = "malloc", | ||
) | ||
|
||
filegroup( | ||
name = "empty", | ||
srcs = [], | ||
) | ||
|
||
filegroup( | ||
name = "cc_wrapper", | ||
srcs = ["cc_wrapper.sh"], | ||
) | ||
|
||
filegroup( | ||
name = "compiler_deps", | ||
srcs = glob( | ||
["extra_tools/**"], | ||
allow_empty = True, | ||
) + [":builtin_include_directory_paths"], | ||
) | ||
|
||
# This is the entry point for --crosstool_top. Toolchains are found | ||
# by lopping off the name of --crosstool_top and searching for | ||
# the "${CPU}" entry in the toolchains attribute. | ||
cc_toolchain_suite( | ||
name = "toolchain", | ||
toolchains = { | ||
"armeabi-v7a": ":cc-compiler-armeabi-v7a", | ||
"armeabi-v7a|compiler": ":cc-compiler-armeabi-v7a", | ||
"k8": ":cc-compiler-k8", | ||
"k8|clang": ":cc-compiler-k8", | ||
}, | ||
) | ||
|
||
cc_toolchain( | ||
name = "cc-compiler-k8", | ||
all_files = ":compiler_deps", | ||
ar_files = ":compiler_deps", | ||
as_files = ":compiler_deps", | ||
compiler_files = ":compiler_deps", | ||
dwp_files = ":empty", | ||
linker_files = ":compiler_deps", | ||
module_map = ":module.modulemap", | ||
objcopy_files = ":empty", | ||
strip_files = ":empty", | ||
supports_param_files = 1, | ||
toolchain_config = ":linux_gnu_x86", | ||
toolchain_identifier = "linux_gnu_x86", | ||
) | ||
|
||
cc_toolchain_config( | ||
name = "linux_gnu_x86", | ||
abi_libc_version = "glibc_2.19", | ||
abi_version = "clang", | ||
compile_flags = [ | ||
"-U_FORTIFY_SOURCE", | ||
"-fstack-protector", | ||
"-Wall", | ||
"-Wthread-safety", | ||
"-Wself-assign", | ||
"-fcolor-diagnostics", | ||
"-fno-omit-frame-pointer", | ||
], | ||
compiler = "clang", | ||
coverage_compile_flags = ["--coverage"], | ||
coverage_link_flags = ["--coverage"], | ||
cpu = "k8", | ||
cxx_builtin_include_directories = [ | ||
"/usr/local/include", | ||
"/usr/local/lib/clang/11.0.0/include", | ||
"/usr/include/x86_64-linux-gnu", | ||
"/usr/include", | ||
"/usr/local/lib/clang/11.0.0/share", | ||
"/usr/include/c++/5.4.0", | ||
"/usr/include/x86_64-linux-gnu/c++/5.4.0", | ||
"/usr/include/c++/5.4.0/backward", | ||
], | ||
cxx_flags = ["-std=c++0x"], | ||
dbg_compile_flags = ["-g"], | ||
host_system_name = "i686-unknown-linux-gnu", | ||
link_flags = [ | ||
"-fuse-ld=/usr/bin/ld.gold", | ||
"-Wl,-no-as-needed", | ||
"-Wl,-z,relro,-z,now", | ||
"-B/usr/local/bin", | ||
"-lstdc++", | ||
"-lm", | ||
], | ||
link_libs = [], | ||
opt_compile_flags = [ | ||
"-g0", | ||
"-O2", | ||
"-D_FORTIFY_SOURCE=1", | ||
"-DNDEBUG", | ||
"-ffunction-sections", | ||
"-fdata-sections", | ||
], | ||
opt_link_flags = ["-Wl,--gc-sections"], | ||
supports_start_end_lib = True, | ||
target_libc = "glibc_2.19", | ||
target_system_name = "x86_64-unknown-linux-gnu", | ||
tool_paths = { | ||
"ar": "/usr/bin/ar", | ||
"cpp": "/usr/bin/cpp", | ||
"dwp": "/usr/bin/dwp", | ||
"gcc": "/usr/local/bin/clang", | ||
"gcov": "/dev/null", | ||
"ld": "/usr/bin/ld", | ||
"nm": "/usr/bin/nm", | ||
"objcopy": "/usr/bin/objcopy", | ||
"objdump": "/usr/bin/objdump", | ||
"strip": "/usr/bin/strip", | ||
}, | ||
toolchain_identifier = "linux_gnu_x86", | ||
unfiltered_compile_flags = [ | ||
"-no-canonical-prefixes", | ||
"-Wno-builtin-macro-redefined", | ||
"-D__DATE__=\"redacted\"", | ||
"-D__TIMESTAMP__=\"redacted\"", | ||
"-D__TIME__=\"redacted\"", | ||
], | ||
) | ||
|
||
# Android tooling requires a default toolchain for the armeabi-v7a cpu. | ||
cc_toolchain( | ||
name = "cc-compiler-armeabi-v7a", | ||
all_files = ":empty", | ||
ar_files = ":empty", | ||
as_files = ":empty", | ||
compiler_files = ":empty", | ||
dwp_files = ":empty", | ||
linker_files = ":empty", | ||
objcopy_files = ":empty", | ||
strip_files = ":empty", | ||
supports_param_files = 1, | ||
toolchain_config = ":stub_armeabi-v7a", | ||
toolchain_identifier = "stub_armeabi-v7a", | ||
) | ||
|
||
armeabi_cc_toolchain_config(name = "stub_armeabi-v7a") |
82 changes: 82 additions & 0 deletions
82
configs/ubuntu16_04_clang/11.0.0/bazel_3.7.0/cc/armeabi_cc_toolchain_config.bzl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# Copyright 2019 The Bazel Authors. All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
"""A Starlark cc_toolchain configuration rule""" | ||
|
||
load( | ||
"@bazel_tools//tools/cpp:cc_toolchain_config_lib.bzl", | ||
"feature", | ||
"tool_path", | ||
) | ||
|
||
def _impl(ctx): | ||
toolchain_identifier = "stub_armeabi-v7a" | ||
host_system_name = "armeabi-v7a" | ||
target_system_name = "armeabi-v7a" | ||
target_cpu = "armeabi-v7a" | ||
target_libc = "armeabi-v7a" | ||
compiler = "compiler" | ||
abi_version = "armeabi-v7a" | ||
abi_libc_version = "armeabi-v7a" | ||
cc_target_os = None | ||
builtin_sysroot = None | ||
action_configs = [] | ||
|
||
supports_pic_feature = feature(name = "supports_pic", enabled = True) | ||
supports_dynamic_linker_feature = feature(name = "supports_dynamic_linker", enabled = True) | ||
features = [supports_dynamic_linker_feature, supports_pic_feature] | ||
|
||
cxx_builtin_include_directories = [] | ||
artifact_name_patterns = [] | ||
make_variables = [] | ||
|
||
tool_paths = [ | ||
tool_path(name = "ar", path = "/bin/false"), | ||
tool_path(name = "compat-ld", path = "/bin/false"), | ||
tool_path(name = "cpp", path = "/bin/false"), | ||
tool_path(name = "dwp", path = "/bin/false"), | ||
tool_path(name = "gcc", path = "/bin/false"), | ||
tool_path(name = "gcov", path = "/bin/false"), | ||
tool_path(name = "ld", path = "/bin/false"), | ||
tool_path(name = "nm", path = "/bin/false"), | ||
tool_path(name = "objcopy", path = "/bin/false"), | ||
tool_path(name = "objdump", path = "/bin/false"), | ||
tool_path(name = "strip", path = "/bin/false"), | ||
] | ||
|
||
return cc_common.create_cc_toolchain_config_info( | ||
ctx = ctx, | ||
features = features, | ||
action_configs = action_configs, | ||
artifact_name_patterns = artifact_name_patterns, | ||
cxx_builtin_include_directories = cxx_builtin_include_directories, | ||
toolchain_identifier = toolchain_identifier, | ||
host_system_name = host_system_name, | ||
target_system_name = target_system_name, | ||
target_cpu = target_cpu, | ||
target_libc = target_libc, | ||
compiler = compiler, | ||
abi_version = abi_version, | ||
abi_libc_version = abi_libc_version, | ||
tool_paths = tool_paths, | ||
make_variables = make_variables, | ||
builtin_sysroot = builtin_sysroot, | ||
cc_target_os = cc_target_os, | ||
) | ||
|
||
armeabi_cc_toolchain_config = rule( | ||
implementation = _impl, | ||
attrs = {}, | ||
provides = [CcToolchainConfigInfo], | ||
) |
14 changes: 14 additions & 0 deletions
14
configs/ubuntu16_04_clang/11.0.0/bazel_3.7.0/cc/builtin_include_directory_paths
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
This file is generated by cc_configure and contains builtin include directories | ||
that /usr/local/bin/clang reported. This file is a dependency of every compilation action and | ||
changes to it will be reflected in the action cache key. When some of these | ||
paths change, Bazel will make sure to rerun the action, even though none of | ||
declared action inputs or the action commandline changes. | ||
|
||
/usr/local/include | ||
/usr/local/lib/clang/11.0.0/include | ||
/usr/include/x86_64-linux-gnu | ||
/usr/include | ||
/usr/local/lib/clang/11.0.0/share | ||
/usr/include/c++/5.4.0 | ||
/usr/include/x86_64-linux-gnu/c++/5.4.0 | ||
/usr/include/c++/5.4.0/backward |
Oops, something went wrong.