Unverified Commit 5d09f1a6 authored by Randy Eckenrode's avatar Randy Eckenrode
Browse files

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

parent 0c3fc968
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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.
+1 −3
Original line number Diff line number Diff line
@@ -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
    ];

+1 −3
Original line number Diff line number Diff line
@@ -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.