bazel_{5,6,7}: get libc++ headers on Darwin from stdenv.cc.libcxx

This commit is contained in:
Randy Eckenrode
2025-04-18 19:06:37 -04:00
parent 0c3fc96845
commit 5d09f1a60c
3 changed files with 3 additions and 9 deletions
@@ -28,7 +28,6 @@
writeScript,
# Apple dependencies
cctools,
libcxx,
sigtool,
# Allow to independently override the jdks used to build and run respectively
buildJdk,
@@ -451,7 +450,7 @@ stdenv.mkDerivation rec {
# libcxx includes aren't added by libcxx hook
# https://github.com/NixOS/nixpkgs/pull/41589
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem ${lib.getDev libcxx}/include/c++/v1"
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem ${lib.getInclude stdenv.cc.libcxx}/include/c++/v1"
# for CLang 16 compatibility in external/{absl,upb} dependencies and in execlog
export NIX_CFLAGS_COMPILE+=" -Wno-deprecated-builtins -Wno-gnu-offsetof-extensions -Wno-implicit-function-declaration"
@@ -622,7 +621,6 @@ stdenv.mkDerivation rec {
]
++ lib.optionals (stdenv.hostPlatform.isDarwin) [
cctools
libcxx
];
# Bazel makes extensive use of symlinks in the WORKSPACE.
@@ -31,7 +31,6 @@
writeScript,
# Apple dependencies
cctools,
libcxx,
sigtool,
# Allow to independently override the jdks used to build and run respectively
buildJdk,
@@ -521,7 +520,7 @@ stdenv.mkDerivation rec {
# libcxx includes aren't added by libcxx hook
# https://github.com/NixOS/nixpkgs/pull/41589
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem ${lib.getDev libcxx}/include/c++/v1"
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem ${lib.getInclude stdenv.cc.libcxx}/include/c++/v1"
# for CLang 16 compatibility in external/{absl,upb} dependencies
export NIX_CFLAGS_COMPILE+=" -Wno-deprecated-builtins -Wno-gnu-offsetof-extensions"
@@ -690,7 +689,6 @@ stdenv.mkDerivation rec {
]
++ lib.optionals (stdenv.hostPlatform.isDarwin) [
cctools
libcxx
sigtool
];
@@ -34,7 +34,6 @@
python3,
# Apple dependencies
cctools,
libcxx,
libtool,
sigtool,
# Allow to independently override the jdks used to build and run respectively
@@ -406,7 +405,7 @@ stdenv.mkDerivation rec {
# libcxx includes aren't added by libcxx hook
# https://github.com/NixOS/nixpkgs/pull/41589
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem ${lib.getDev libcxx}/include/c++/v1"
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem ${lib.getInclude stdenv.cc.libcxx}/include/c++/v1"
# for CLang 16 compatibility in external/upb dependency
export NIX_CFLAGS_COMPILE+=" -Wno-gnu-offsetof-extensions"
@@ -554,7 +553,6 @@ stdenv.mkDerivation rec {
]
++ lib.optionals (stdenv.hostPlatform.isDarwin) [
cctools
libcxx
];
# Bazel makes extensive use of symlinks in the WORKSPACE.