mirror of https://github.com/grpc/grpc.git
commit
d2b2f7f5a3
53 changed files with 2186 additions and 180 deletions
@ -0,0 +1,188 @@ |
|||||||
|
# Copyright 2018 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 Windows. |
||||||
|
licenses(["notice"]) # Apache v2 |
||||||
|
|
||||||
|
package(default_visibility = ["//visibility:public"]) |
||||||
|
|
||||||
|
load(":cc_toolchain_config.bzl", "cc_toolchain_config") |
||||||
|
|
||||||
|
cc_library( |
||||||
|
name = "malloc", |
||||||
|
) |
||||||
|
|
||||||
|
filegroup( |
||||||
|
name = "empty", |
||||||
|
srcs = [], |
||||||
|
) |
||||||
|
|
||||||
|
# Hardcoded toolchain, legacy behaviour. |
||||||
|
cc_toolchain_suite( |
||||||
|
name = "toolchain", |
||||||
|
toolchains = { |
||||||
|
"armeabi-v7a|compiler": ":cc-compiler-armeabi-v7a", |
||||||
|
"x64_windows|msvc-cl": ":cc-compiler-x64_windows", |
||||||
|
"x64_windows|msys-gcc": ":cc-compiler-x64_windows_msys", |
||||||
|
"x64_windows|mingw-gcc": ":cc-compiler-x64_windows_mingw", |
||||||
|
"x64_windows_msys": ":cc-compiler-x64_windows_msys", |
||||||
|
"x64_windows": ":cc-compiler-x64_windows", |
||||||
|
"armeabi-v7a": ":cc-compiler-armeabi-v7a", |
||||||
|
}, |
||||||
|
) |
||||||
|
|
||||||
|
cc_toolchain( |
||||||
|
name = "cc-compiler-x64_windows_msys", |
||||||
|
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 = ":msys_x64", |
||||||
|
toolchain_identifier = "msys_x64", |
||||||
|
) |
||||||
|
|
||||||
|
cc_toolchain_config( |
||||||
|
name = "msys_x64", |
||||||
|
compiler = "msys-gcc", |
||||||
|
cpu = "x64_windows", |
||||||
|
) |
||||||
|
|
||||||
|
toolchain( |
||||||
|
name = "cc-toolchain-x64_windows_msys", |
||||||
|
exec_compatible_with = [ |
||||||
|
"@bazel_tools//platforms:x86_64", |
||||||
|
"@bazel_tools//platforms:windows", |
||||||
|
"@bazel_tools//tools/cpp:msys", |
||||||
|
], |
||||||
|
target_compatible_with = [ |
||||||
|
"@bazel_tools//platforms:x86_64", |
||||||
|
"@bazel_tools//platforms:windows", |
||||||
|
], |
||||||
|
toolchain = ":cc-compiler-x64_windows_msys", |
||||||
|
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", |
||||||
|
) |
||||||
|
|
||||||
|
cc_toolchain( |
||||||
|
name = "cc-compiler-x64_windows_mingw", |
||||||
|
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 = 0, |
||||||
|
toolchain_config = ":msys_x64_mingw", |
||||||
|
toolchain_identifier = "msys_x64_mingw", |
||||||
|
) |
||||||
|
|
||||||
|
cc_toolchain_config( |
||||||
|
name = "msys_x64_mingw", |
||||||
|
compiler = "mingw-gcc", |
||||||
|
cpu = "x64_windows", |
||||||
|
) |
||||||
|
|
||||||
|
toolchain( |
||||||
|
name = "cc-toolchain-x64_windows_mingw", |
||||||
|
exec_compatible_with = [ |
||||||
|
"@bazel_tools//platforms:x86_64", |
||||||
|
"@bazel_tools//platforms:windows", |
||||||
|
"@bazel_tools//tools/cpp:mingw", |
||||||
|
], |
||||||
|
target_compatible_with = [ |
||||||
|
"@bazel_tools//platforms:x86_64", |
||||||
|
"@bazel_tools//platforms:windows", |
||||||
|
], |
||||||
|
toolchain = ":cc-compiler-x64_windows_mingw", |
||||||
|
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", |
||||||
|
) |
||||||
|
|
||||||
|
cc_toolchain( |
||||||
|
name = "cc-compiler-x64_windows", |
||||||
|
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 = ":msvc_x64", |
||||||
|
toolchain_identifier = "msvc_x64", |
||||||
|
) |
||||||
|
|
||||||
|
cc_toolchain_config( |
||||||
|
name = "msvc_x64", |
||||||
|
compiler = "msvc-cl", |
||||||
|
cpu = "x64_windows", |
||||||
|
) |
||||||
|
|
||||||
|
toolchain( |
||||||
|
name = "cc-toolchain-x64_windows", |
||||||
|
exec_compatible_with = [ |
||||||
|
"@bazel_tools//platforms:x86_64", |
||||||
|
"@bazel_tools//platforms:windows", |
||||||
|
], |
||||||
|
target_compatible_with = [ |
||||||
|
"@bazel_tools//platforms:x86_64", |
||||||
|
"@bazel_tools//platforms:windows", |
||||||
|
], |
||||||
|
toolchain = ":cc-compiler-x64_windows", |
||||||
|
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", |
||||||
|
) |
||||||
|
|
||||||
|
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 = [ |
||||||
|
], |
||||||
|
target_compatible_with = [ |
||||||
|
"@bazel_tools//platforms:arm", |
||||||
|
"@bazel_tools//platforms:android", |
||||||
|
], |
||||||
|
toolchain = ":cc-compiler-armeabi-v7a", |
||||||
|
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", |
||||||
|
) |
||||||
|
|
||||||
|
filegroup( |
||||||
|
name = "link_dynamic_library", |
||||||
|
srcs = ["link_dynamic_library.sh"], |
||||||
|
) |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,23 @@ |
|||||||
|
# pylint: disable=g-bad-file-header |
||||||
|
# Copyright 2017 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. |
||||||
|
|
||||||
|
"""Skylark rule that stubs a toolchain.""" |
||||||
|
|
||||||
|
def _dummy_toolchain_impl(ctx): |
||||||
|
ctx = ctx # unused argument |
||||||
|
toolchain = platform_common.ToolchainInfo() |
||||||
|
return [toolchain] |
||||||
|
|
||||||
|
dummy_toolchain = rule(_dummy_toolchain_impl, attrs = {}) |
@ -1,3 +1,49 @@ |
|||||||
# TODO(yfen): Merge with rbe_common.bazelrc and enable Windows RBE |
startup --host_jvm_args=-Dbazel.DigestFunction=SHA256 |
||||||
|
|
||||||
|
build --remote_cache=remotebuildexecution.googleapis.com |
||||||
|
build --remote_executor=remotebuildexecution.googleapis.com |
||||||
|
build --tls_enabled=true |
||||||
|
|
||||||
|
build --host_crosstool_top=//third_party/toolchains/bazel_0.23.2_rbe_windows:toolchain |
||||||
|
build --crosstool_top=//third_party/toolchains/bazel_0.23.2_rbe_windows:toolchain |
||||||
|
build --extra_toolchains=//third_party/toolchains/bazel_0.23.2_rbe_windows:cc-toolchain-x64_windows |
||||||
|
# Use custom execution platforms defined in third_party/toolchains |
||||||
|
build --extra_execution_platforms=//third_party/toolchains:rbe_windows |
||||||
|
build --host_platform=//third_party/toolchains:rbe_windows |
||||||
|
build --platforms=//third_party/toolchains:rbe_windows |
||||||
|
|
||||||
|
build --shell_executable=C:\\tools\\msys64\\usr\\bin\\bash.exe |
||||||
|
build --python_path=C:\\Python27\\python.exe |
||||||
|
|
||||||
|
build --spawn_strategy=remote |
||||||
|
build --strategy=Javac=remote |
||||||
|
build --strategy=Closure=remote |
||||||
|
build --genrule_strategy=remote |
||||||
|
build --remote_timeout=3600 |
||||||
|
|
||||||
|
build --remote_instance_name=projects/grpc-testing/instances/grpc-windows-rbe-test |
||||||
|
|
||||||
|
build --verbose_failures=true |
||||||
|
|
||||||
|
build --experimental_strict_action_env=true |
||||||
|
build --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 |
||||||
|
|
||||||
|
# don't use port server |
||||||
|
build --define GRPC_PORT_ISOLATED_RUNTIME=1 |
||||||
build --test_tag_filters=-no_windows |
build --test_tag_filters=-no_windows |
||||||
build --build_tag_filters=-no_windows |
build --build_tag_filters=-no_windows |
||||||
|
|
||||||
|
# without verbose gRPC logs the test outputs are not very useful |
||||||
|
test --test_env=GRPC_VERBOSITY=debug |
||||||
|
|
||||||
|
# Set flags for uploading to BES in order to view results in the Bazel Build |
||||||
|
# Results UI. |
||||||
|
build --bes_backend="buildeventservice.googleapis.com" |
||||||
|
build --bes_timeout=60s |
||||||
|
build --bes_results_url="https://source.cloud.google.com/results/invocations/" |
||||||
|
build --project_id=grpc-testing |
||||||
|
|
||||||
|
build --jobs=30 |
||||||
|
|
||||||
|
# print output for tests that fail (default is "summary") |
||||||
|
build --test_output=errors |
||||||
|
@ -0,0 +1,29 @@ |
|||||||
|
#!/bin/sh |
||||||
|
# Copyright 2019 gRPC authors. |
||||||
|
# |
||||||
|
# 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. |
||||||
|
|
||||||
|
set -e |
||||||
|
|
||||||
|
cd "$(dirname "$0")/../../.." |
||||||
|
|
||||||
|
# |
||||||
|
# Prevent the use of synchronization and threading constructs from std:: since |
||||||
|
# the code should be using grpc_core::Mutex, grpc::internal::Mutex, |
||||||
|
# grpc_core::Thread, etc. |
||||||
|
# |
||||||
|
|
||||||
|
egrep -Irn \ |
||||||
|
'std::(mutex|condition_variable|lock_guard|unique_lock|thread)' \ |
||||||
|
include/grpc include/grpcpp src/core src/cpp | diff - /dev/null |
||||||
|
|
Loading…
Reference in new issue