From 84e4a80b017d8913f5a8445d2ff0bfd58879985e Mon Sep 17 00:00:00 2001 From: "Nicolas B. Pierron" Date: Tue, 23 Jul 2019 18:13:32 +0200 Subject: [PATCH] Gecko: Use stdenv's clang for clang paths. --- pkgs/gecko/default.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pkgs/gecko/default.nix b/pkgs/gecko/default.nix index a9479d2..869bc8f 100644 --- a/pkgs/gecko/default.nix +++ b/pkgs/gecko/default.nix @@ -109,14 +109,23 @@ let (if stdenv.isAarch64 then null else rr) ]; + # bindgen.configure now has a rule to check that with-libclang-path matches CC + # or CXX. Default to the stdenv compiler if we are compiling with clang. + clang_path = + if stdenv.cc.isGNU then "${llvmPackages.clang}/bin/clang" + else "${stdenv.cc}/bin/cc"; + libclang_path = + if stdenv.cc.isGNU then "${llvmPackages.clang.cc.lib}/lib" + else "${stdenv.cc.cc.lib}/lib"; + genMozConfig = '' cxxLib=$( echo -n ${gcc}/include/c++/* ) archLib=$cxxLib/$( ${gcc}/bin/gcc -dumpmachine ) cat - > $MOZCONFIG <