Skip to content

Commit aee9be0

Browse files
Toolchain configs for marketplace.gcr.io/google/rbe-ubuntu16-04, Bazel 3.1.0 (2020/04/22) (#866)
1 parent 810ac34 commit aee9be0

9 files changed

Lines changed: 1562 additions & 2 deletions

File tree

configs/dependency-tracking/ubuntu1604.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""Information tracking the latest published configs."""
2-
bazel = "3.0.0"
2+
bazel = "3.1.0"
33
registry = "marketplace.gcr.io"
44
repository = "google/rbe-ubuntu16-04"
55
digest = "sha256:5464e3e83dc656fc6e4eae6a01f5c2645f1f7e95854b3802b85e86484132d90e"
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
# Copyright 2016 The Bazel Authors. All rights reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# This becomes the BUILD file for @local_config_cc// under non-BSD unixes.
16+
17+
load("@rules_cc//cc:defs.bzl", "cc_toolchain", "cc_toolchain_suite")
18+
load(":armeabi_cc_toolchain_config.bzl", "armeabi_cc_toolchain_config")
19+
load(":cc_toolchain_config.bzl", "cc_toolchain_config")
20+
21+
package(default_visibility = ["//visibility:public"])
22+
23+
licenses(["notice"]) # Apache 2.0
24+
25+
cc_library(
26+
name = "malloc",
27+
)
28+
29+
filegroup(
30+
name = "empty",
31+
srcs = [],
32+
)
33+
34+
filegroup(
35+
name = "cc_wrapper",
36+
srcs = ["cc_wrapper.sh"],
37+
)
38+
39+
filegroup(
40+
name = "compiler_deps",
41+
srcs = glob(
42+
["extra_tools/**"],
43+
allow_empty = True,
44+
) + [":builtin_include_directory_paths"],
45+
)
46+
47+
# This is the entry point for --crosstool_top. Toolchains are found
48+
# by lopping off the name of --crosstool_top and searching for
49+
# the "${CPU}" entry in the toolchains attribute.
50+
cc_toolchain_suite(
51+
name = "toolchain",
52+
toolchains = {
53+
"armeabi-v7a": ":cc-compiler-armeabi-v7a",
54+
"armeabi-v7a|compiler": ":cc-compiler-armeabi-v7a",
55+
"k8": ":cc-compiler-k8",
56+
"k8|clang": ":cc-compiler-k8",
57+
},
58+
)
59+
60+
cc_toolchain(
61+
name = "cc-compiler-k8",
62+
all_files = ":compiler_deps",
63+
ar_files = ":compiler_deps",
64+
as_files = ":compiler_deps",
65+
compiler_files = ":compiler_deps",
66+
dwp_files = ":empty",
67+
linker_files = ":compiler_deps",
68+
objcopy_files = ":empty",
69+
strip_files = ":empty",
70+
supports_param_files = 1,
71+
toolchain_config = ":linux_gnu_x86",
72+
toolchain_identifier = "linux_gnu_x86",
73+
)
74+
75+
cc_toolchain_config(
76+
name = "linux_gnu_x86",
77+
abi_libc_version = "glibc_2.19",
78+
abi_version = "clang",
79+
compile_flags = [
80+
"-U_FORTIFY_SOURCE",
81+
"-fstack-protector",
82+
"-Wall",
83+
"-Wthread-safety",
84+
"-Wself-assign",
85+
"-fcolor-diagnostics",
86+
"-fno-omit-frame-pointer",
87+
],
88+
compiler = "clang",
89+
coverage_compile_flags = ["--coverage"],
90+
coverage_link_flags = ["--coverage"],
91+
cpu = "k8",
92+
cxx_builtin_include_directories = [
93+
"/usr/local/include",
94+
"/usr/local/lib/clang/11.0.0/include",
95+
"/usr/include/x86_64-linux-gnu",
96+
"/usr/include",
97+
"/usr/local/lib/clang/11.0.0/share",
98+
"/usr/include/c++/5.4.0",
99+
"/usr/include/x86_64-linux-gnu/c++/5.4.0",
100+
"/usr/include/c++/5.4.0/backward",
101+
],
102+
cxx_flags = ["-std=c++0x"],
103+
dbg_compile_flags = ["-g"],
104+
host_system_name = "i686-unknown-linux-gnu",
105+
link_flags = [
106+
"-fuse-ld=/usr/bin/ld.gold",
107+
"-Wl,-no-as-needed",
108+
"-Wl,-z,relro,-z,now",
109+
"-B/usr/local/bin",
110+
"-lstdc++",
111+
"-lm",
112+
],
113+
link_libs = [],
114+
opt_compile_flags = [
115+
"-g0",
116+
"-O2",
117+
"-D_FORTIFY_SOURCE=1",
118+
"-DNDEBUG",
119+
"-ffunction-sections",
120+
"-fdata-sections",
121+
],
122+
opt_link_flags = ["-Wl,--gc-sections"],
123+
supports_start_end_lib = True,
124+
target_libc = "glibc_2.19",
125+
target_system_name = "x86_64-unknown-linux-gnu",
126+
tool_paths = {
127+
"ar": "/usr/bin/ar",
128+
"cpp": "/usr/bin/cpp",
129+
"dwp": "/usr/bin/dwp",
130+
"gcc": "/usr/local/bin/clang",
131+
"gcov": "/dev/null",
132+
"ld": "/usr/bin/ld",
133+
"nm": "/usr/bin/nm",
134+
"objcopy": "/usr/bin/objcopy",
135+
"objdump": "/usr/bin/objdump",
136+
"strip": "/usr/bin/strip",
137+
},
138+
toolchain_identifier = "linux_gnu_x86",
139+
unfiltered_compile_flags = [
140+
"-no-canonical-prefixes",
141+
"-Wno-builtin-macro-redefined",
142+
"-D__DATE__=\"redacted\"",
143+
"-D__TIMESTAMP__=\"redacted\"",
144+
"-D__TIME__=\"redacted\"",
145+
],
146+
)
147+
148+
# Android tooling requires a default toolchain for the armeabi-v7a cpu.
149+
cc_toolchain(
150+
name = "cc-compiler-armeabi-v7a",
151+
all_files = ":empty",
152+
ar_files = ":empty",
153+
as_files = ":empty",
154+
compiler_files = ":empty",
155+
dwp_files = ":empty",
156+
linker_files = ":empty",
157+
objcopy_files = ":empty",
158+
strip_files = ":empty",
159+
supports_param_files = 1,
160+
toolchain_config = ":stub_armeabi-v7a",
161+
toolchain_identifier = "stub_armeabi-v7a",
162+
)
163+
164+
armeabi_cc_toolchain_config(name = "stub_armeabi-v7a")
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Copyright 2019 The Bazel Authors. All rights reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""A Starlark cc_toolchain configuration rule"""
16+
17+
load(
18+
"@bazel_tools//tools/cpp:cc_toolchain_config_lib.bzl",
19+
"feature",
20+
"tool_path",
21+
)
22+
23+
def _impl(ctx):
24+
toolchain_identifier = "stub_armeabi-v7a"
25+
host_system_name = "armeabi-v7a"
26+
target_system_name = "armeabi-v7a"
27+
target_cpu = "armeabi-v7a"
28+
target_libc = "armeabi-v7a"
29+
compiler = "compiler"
30+
abi_version = "armeabi-v7a"
31+
abi_libc_version = "armeabi-v7a"
32+
cc_target_os = None
33+
builtin_sysroot = None
34+
action_configs = []
35+
36+
supports_pic_feature = feature(name = "supports_pic", enabled = True)
37+
supports_dynamic_linker_feature = feature(name = "supports_dynamic_linker", enabled = True)
38+
features = [supports_dynamic_linker_feature, supports_pic_feature]
39+
40+
cxx_builtin_include_directories = []
41+
artifact_name_patterns = []
42+
make_variables = []
43+
44+
tool_paths = [
45+
tool_path(name = "ar", path = "/bin/false"),
46+
tool_path(name = "compat-ld", path = "/bin/false"),
47+
tool_path(name = "cpp", path = "/bin/false"),
48+
tool_path(name = "dwp", path = "/bin/false"),
49+
tool_path(name = "gcc", path = "/bin/false"),
50+
tool_path(name = "gcov", path = "/bin/false"),
51+
tool_path(name = "ld", path = "/bin/false"),
52+
tool_path(name = "nm", path = "/bin/false"),
53+
tool_path(name = "objcopy", path = "/bin/false"),
54+
tool_path(name = "objdump", path = "/bin/false"),
55+
tool_path(name = "strip", path = "/bin/false"),
56+
]
57+
58+
return cc_common.create_cc_toolchain_config_info(
59+
ctx = ctx,
60+
features = features,
61+
action_configs = action_configs,
62+
artifact_name_patterns = artifact_name_patterns,
63+
cxx_builtin_include_directories = cxx_builtin_include_directories,
64+
toolchain_identifier = toolchain_identifier,
65+
host_system_name = host_system_name,
66+
target_system_name = target_system_name,
67+
target_cpu = target_cpu,
68+
target_libc = target_libc,
69+
compiler = compiler,
70+
abi_version = abi_version,
71+
abi_libc_version = abi_libc_version,
72+
tool_paths = tool_paths,
73+
make_variables = make_variables,
74+
builtin_sysroot = builtin_sysroot,
75+
cc_target_os = cc_target_os,
76+
)
77+
78+
armeabi_cc_toolchain_config = rule(
79+
implementation = _impl,
80+
attrs = {},
81+
provides = [CcToolchainConfigInfo],
82+
)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
This file is generated by cc_configure and contains builtin include directories
2+
that /usr/local/bin/clang reported. This file is a dependency of every compilation action and
3+
changes to it will be reflected in the action cache key. When some of these
4+
paths change, Bazel will make sure to rerun the action, even though none of
5+
declared action inputs or the action commandline changes.
6+
7+
/usr/local/include
8+
/usr/local/lib/clang/11.0.0/include
9+
/usr/include/x86_64-linux-gnu
10+
/usr/include
11+
/usr/local/lib/clang/11.0.0/share
12+
/usr/include/c++/5.4.0
13+
/usr/include/x86_64-linux-gnu/c++/5.4.0
14+
/usr/include/c++/5.4.0/backward

0 commit comments

Comments
 (0)