From 467e2e7d8c2452ad99f26029cb6087cc59b3b542 Mon Sep 17 00:00:00 2001 From: Claudio Bley Date: Mon, 13 May 2024 17:57:08 +0200 Subject: [PATCH] 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 --- .bazelrc.common | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.bazelrc.common b/.bazelrc.common index 6d8fa4fd1..c746b343f 100644 --- a/.bazelrc.common +++ b/.bazelrc.common @@ -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