-
Notifications
You must be signed in to change notification settings - Fork 63
/
Copy path.bazelrc
22 lines (20 loc) · 1.1 KB
/
.bazelrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#
# The grpc library currently does not compile on a Mac, which makes it hard to run unit tests during development.
#
# The compile error looks like this:
# ERROR: [...]/external/com_github_grpc_grpc/BUILD:2095:1: Linking of rule '@com_github_grpc_grpc//:grpc++_base' failed (Exit 1) cc_wrapper.sh failed: error executing command external/local_config_cc/cc_wrapper.sh -lc++ -fobjc-link-runtime -Wl,-S -shared -o bazel-out/darwin-fastbuild/bin/external/com_github_grpc_grpc/libgrpc++_base.so ... (remaining 41 argument(s) skipped)
#
# The following workaround was suggested by https://github.com/grpc/grpc/issues/19645
#
build --copt -DGRPC_BAZEL_BUILD
build --cxxopt=-std=c++17
# Clang with libc++
build:libc++ --config=clang
build:libc++ --action_env=CXXFLAGS=-stdlib=libc++
build:libc++ --action_env=LDFLAGS=-stdlib=libc++
build:libc++ --action_env=BAZEL_CXXOPTS=-stdlib=libc++
build:libc++ --action_env=BAZEL_LINKLIBS=-l%:libc++.a:-l%:libc++abi.a
build:libc++ --action_env=BAZEL_LINKOPTS=-lm:-pthread
build:libc++ --define force_libcpp=enabled
try-import %workspace%/clang.bazelrc
try-import %workspace%/user.bazelrc