Skip to content

Commit 3297364

Browse files
author
Chris Cummins
committed
Use --host_cxxopt instead of BAZEL_CXXOPTS.
1 parent e852c38 commit 3297364

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.bazelrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
build --cxxopt='-std=c++17'
55
test --cxxopt='-std=c++17'
66

7+
# Duplicate the `--cxxopt` flag here to workaround gRPC build issue. See:
8+
# https://github.com/bazelbuild/bazel/issues/16371
9+
build --host_cxxopt='-std=c++17'
10+
test --host_cxxopt='-std=c++17'
11+
712
# Workaround for broken grpc build on macOS.
813
# See: https://github.com/bazelbuild/bazel/issues/4341
914
build --copt -DGRPC_BAZEL_BUILD

Makefile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,9 @@ bazel-fetch:
176176
fi; \
177177
done
178178

179-
# NOTE(cummins): Workaround for grpc++ build failure caused by --cxxopt in
180-
# .bazelrc not being used. See: https://github.com/bazelbuild/bazel/issues/16371
181-
_BAZEL_CXXOPTS = "-std=c++17"
182-
183179
bazel-build: bazel-fetch
184180
$(PYTHON) -m pip install -r compiler_gym/requirements.txt -r compiler_gym/requirements_build.txt
185-
BAZEL_CXXOPTS=$(_BAZEL_CXXOPTS) $(BAZEL) $(BAZEL_OPTS) build $(BAZEL_BUILD_OPTS) $(BUILD_TARGET)
181+
$(BAZEL) $(BAZEL_OPTS) build $(BAZEL_BUILD_OPTS) $(BUILD_TARGET)
186182

187183
bdist_wheel: bazel-build
188184
$(PYTHON) setup.py bdist_wheel

0 commit comments

Comments
 (0)