Skip to content

Commit

Permalink
Use 2014 ISO C++ standard on the host to compile abseil-cpp
Browse files Browse the repository at this point in the history
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
  • Loading branch information
avdv committed Jun 25, 2024
1 parent 928febd commit 467e2e7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .bazelrc.common
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ build:linux-nixpkgs --config=nixpkgs
build:macos-nixpkgs --config=nixpkgs
build:nixpkgs --host_platform=@rules_nixpkgs_core//platforms:host

# abseil c++ (a dependency of protobuf) needs a C++14 compiler, but rules_nixpkgs cc sets `-std=c++0x`
build:nixpkgs --host_cxxopt=-std=c++14

# Build and Test Filters
# ----------------------
# Note tag filters do not compose. If you wish to augment these filters on the
Expand Down

0 comments on commit 467e2e7

Please sign in to comment.