Skip to content

Commit 467e2e7

Browse files
committed
Use 2014 ISO C++ standard on the host to compile abseil-cpp
This is only needed when using the cc toolchain from nixpkgs, since it explicitly adds the flag `-std=c++0x` - see [1]. [1]: https://github.com/tweag/rules_nixpkgs/blob/4089de9a9cad10c703d0bbb1bba119ca99299e54/toolchains/cc/cc.nix#L201-L204
1 parent 928febd commit 467e2e7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.bazelrc.common

+3
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ build:linux-nixpkgs --config=nixpkgs
4141
build:macos-nixpkgs --config=nixpkgs
4242
build:nixpkgs --host_platform=@rules_nixpkgs_core//platforms:host
4343

44+
# abseil c++ (a dependency of protobuf) needs a C++14 compiler, but rules_nixpkgs cc sets `-std=c++0x`
45+
build:nixpkgs --host_cxxopt=-std=c++14
46+
4447
# Build and Test Filters
4548
# ----------------------
4649
# Note tag filters do not compose. If you wish to augment these filters on the

0 commit comments

Comments
 (0)