-
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.
Release Ubuntu 16.04 Clang 1.2 configs for Bazel 0.25.0 (#481)
* Release Ubuntu 16.04 Clang 1.2 configs for Bazel 0.25.0 * also remove obsolete doc comment from output_base.yaml * update Bazel version fallback to use same version as dependency tracking for toolchain configs * fix cloudbuild.yaml
- Loading branch information
Nicolas Lopez
authored
May 3, 2019
1 parent
56f9007
commit 9bd2748
Showing
20 changed files
with
4,056 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
# 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 file is auto-generated from release/bazelrc.tpl and should not be | ||
# modified directly. | ||
|
||
# This .bazelrc file contains all of the flags required for the provided | ||
# toolchain with Remote Build Execution. | ||
# | ||
# This .bazelrc file also contains all of the flags required for the local | ||
# docker sandboxing. | ||
|
||
# Depending on how many machines are in the remote execution instance, setting | ||
# this higher can make builds faster by allowing more jobs to run in parallel. | ||
# Setting it too high can result in jobs that timeout, however, while waiting | ||
# for a remote machine to execute them. | ||
build:remote --jobs=50 | ||
|
||
# Set several flags related to specifying the platform, toolchain and java | ||
# properties. | ||
# These flags are duplicated rather than imported from (for example) | ||
# %workspace%/configs/ubuntu16_04_clang/1.2/toolchain.bazelrc to make this | ||
# bazelrc a standalone file that can be copied more easily. | ||
# These flags should only be used as is for the rbe-ubuntu16-04 container | ||
# and need to be adapted to work with other toolchain containers. | ||
build:remote --host_javabase=@bazel_toolchains//configs/ubuntu16_04_clang/1.2:jdk8 | ||
build:remote --javabase=@bazel_toolchains//configs/ubuntu16_04_clang/1.2:jdk8 | ||
build:remote --host_java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8 | ||
build:remote --java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8 | ||
build:remote --crosstool_top=@bazel_toolchains//configs/ubuntu16_04_clang/1.2/bazel_0.25.0/default:toolchain | ||
build:remote --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 | ||
# Platform flags: | ||
# The toolchain container used for execution is defined in the target indicated | ||
# by "extra_execution_platforms", "host_platform" and "platforms". | ||
# If you are using your own toolchain container, you need to create a platform | ||
# target with "constraint_values" that allow for the toolchain specified with | ||
# "extra_toolchains" to be selected (given constraints defined in | ||
# "exec_compatible_with"). | ||
# More about platforms: https://docs.bazel.build/versions/master/platforms.html | ||
build:remote --extra_toolchains=@bazel_toolchains//configs/ubuntu16_04_clang/1.2/bazel_0.25.0/cpp:cc-toolchain-clang-x86_64-default | ||
build:remote --extra_execution_platforms=@bazel_toolchains//configs/ubuntu16_04_clang/1.2:rbe_ubuntu1604 | ||
build:remote --host_platform=@bazel_toolchains//configs/ubuntu16_04_clang/1.2:rbe_ubuntu1604 | ||
build:remote --platforms=@bazel_toolchains//configs/ubuntu16_04_clang/1.2:rbe_ubuntu1604 | ||
|
||
# Set various strategies so that all actions execute remotely. Mixing remote | ||
# and local execution will lead to errors unless the toolchain and remote | ||
# machine exactly match the host machine. | ||
build:remote --spawn_strategy=remote | ||
build:remote --strategy=Javac=remote | ||
build:remote --strategy=Closure=remote | ||
build:remote --strategy=Genrule=remote | ||
build:remote --define=EXECUTOR=remote | ||
|
||
# Enable the remote cache so action results can be shared across machines, | ||
# developers, and workspaces. | ||
build:remote --remote_cache=remotebuildexecution.googleapis.com | ||
|
||
# Enable remote execution so actions are performed on the remote systems. | ||
build:remote --remote_executor=remotebuildexecution.googleapis.com | ||
|
||
# Enable encryption. | ||
build:remote --tls_enabled=true | ||
|
||
# Set a higher timeout value, just in case. | ||
build:remote --remote_timeout=3600 | ||
|
||
# Enable authentication. This will pick up application default credentials by | ||
# default. You can use --auth_credentials=some_file.json to use a service | ||
# account credential instead. | ||
build:remote --auth_enabled=true | ||
|
||
# The following flags are only necessary for local docker sandboxing | ||
# with the rbe-ubuntu16-04 container. Use of these flags is still experimental. | ||
build:docker-sandbox --host_javabase=@bazel_toolchains//configs/ubuntu16_04_clang/1.2:jdk8 | ||
build:docker-sandbox --javabase=@bazel_toolchains//configs/ubuntu16_04_clang/1.2:jdk8 | ||
build:docker-sandbox --crosstool_top=@bazel_toolchains//configs/ubuntu16_04_clang/1.2/bazel_0.25.0/default:toolchain | ||
build:docker-sandbox --experimental_docker_image=gcr.io/cloud-marketplace/google/rbe-ubuntu16-04@sha256:da0f21c71abce3bbb92c3a0c44c3737f007a82b60f8bd2930abc55fe64fc2729 | ||
build:docker-sandbox --spawn_strategy=docker | ||
build:docker-sandbox --strategy=Javac=docker | ||
build:docker-sandbox --strategy=Closure=docker | ||
build:docker-sandbox --strategy=Genrule=docker | ||
build:docker-sandbox --define=EXECUTOR=remote | ||
build:docker-sandbox --experimental_docker_verbose | ||
build:docker-sandbox --experimental_enable_docker_sandbox | ||
|
||
# The following flags enable the remote cache so action results can be shared | ||
# across machines, developers, and workspaces. | ||
build:remote-cache --remote_cache=remotebuildexecution.googleapis.com | ||
build:remote-cache --tls_enabled=true | ||
build:remote-cache --remote_timeout=3600 | ||
build:remote-cache --auth_enabled=true | ||
build:remote-cache --spawn_strategy=standalone | ||
build:remote-cache --strategy=Javac=standalone | ||
build:remote-cache --strategy=Closure=standalone | ||
build:remote-cache --strategy=Genrule=standalone |
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 |
---|---|---|
@@ -1 +1 @@ | ||
bazel-0.24.0.bazelrc | ||
bazel-0.25.0.bazelrc |
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,54 @@ | ||
# 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. | ||
|
||
licenses(["notice"]) # Apache 2.0 | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
# This target is auto-generated from release/cpp.tpl and should not be | ||
# modified directly. | ||
toolchain( | ||
name = "cc-toolchain-clang-x86_64-default", | ||
exec_compatible_with = [ | ||
"@bazel_tools//platforms:linux", | ||
"@bazel_tools//platforms:x86_64", | ||
"@bazel_tools//tools/cpp:clang", | ||
"//constraints:xenial", | ||
], | ||
target_compatible_with = [ | ||
"@bazel_tools//platforms:linux", | ||
"@bazel_tools//platforms:x86_64", | ||
], | ||
toolchain = "//configs/ubuntu16_04_clang/1.2/bazel_0.25.0/default:cc-compiler-k8", | ||
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", | ||
) | ||
|
||
# This target is auto-generated from release/cpp.tpl and should not be | ||
# modified directly. | ||
toolchain( | ||
name = "cc-toolchain-clang-x86_64-msan", | ||
exec_compatible_with = [ | ||
"@bazel_tools//platforms:linux", | ||
"@bazel_tools//platforms:x86_64", | ||
"@bazel_tools//tools/cpp:clang", | ||
"//constraints:xenial", | ||
"//constraints/sanitizers:support_msan", | ||
], | ||
target_compatible_with = [ | ||
"@bazel_tools//platforms:linux", | ||
"@bazel_tools//platforms:x86_64", | ||
], | ||
toolchain = "//configs/ubuntu16_04_clang/1.2/bazel_0.25.0/msan:cc-compiler-k8", | ||
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", | ||
) |
121 changes: 121 additions & 0 deletions
121
configs/ubuntu16_04_clang/1.2/bazel_0.25.0/default/BUILD
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,121 @@ | ||
# 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-FreeBSD unixes. | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
load(":cc_toolchain_config.bzl", "cc_toolchain_config") | ||
|
||
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/**"]) + [":empty"], | ||
) | ||
|
||
# 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 = { | ||
"k8|clang": ":cc-compiler-k8", | ||
"k8": ":cc-compiler-k8", | ||
"armeabi-v7a|compiler": ":cc-compiler-armeabi-v7a", | ||
"armeabi-v7a": ":cc-compiler-armeabi-v7a", | ||
}, | ||
) | ||
|
||
cc_toolchain( | ||
name = "cc-compiler-k8", | ||
all_files = ":compiler_deps", | ||
ar_files = ":empty", | ||
as_files = ":empty", | ||
compiler_files = ":compiler_deps", | ||
dwp_files = ":empty", | ||
linker_files = ":compiler_deps", | ||
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", | ||
compiler = "clang", | ||
cpu = "k8", | ||
) | ||
|
||
toolchain( | ||
name = "cc-toolchain-k8", | ||
exec_compatible_with = [ | ||
# TODO(katre): add autodiscovered constraints for host CPU and OS. | ||
], | ||
target_compatible_with = [ | ||
# TODO(katre): add autodiscovered constraints for host CPU and OS. | ||
], | ||
toolchain = ":cc-compiler-k8", | ||
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", | ||
) | ||
|
||
# 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", | ||
) | ||
|
||
cc_toolchain_config( | ||
name = "stub_armeabi-v7a", | ||
compiler = "compiler", | ||
cpu = "armeabi-v7a", | ||
) | ||
|
||
toolchain( | ||
name = "cc-toolchain-armeabi-v7a", | ||
exec_compatible_with = [ | ||
# TODO(katre): add autodiscovered constraints for host CPU and OS. | ||
], | ||
target_compatible_with = [ | ||
"@bazel_tools//platforms:arm", | ||
"@bazel_tools//platforms:android", | ||
], | ||
toolchain = ":cc-compiler-armabi-v7a", | ||
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", | ||
) |
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 @@ | ||
marketplace.gcr.io/google/clang-ubuntu@sha256:ed21de14f213a6dfe55c50663ae5f95c545ae0f8fce065a70ffe6d8bb260d8d6 |
Oops, something went wrong.