Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4e6a9f04db69
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e66a5f886293
Choose a head ref
  • 3 commits
  • 9 files changed
  • 1 contributor

Commits on Jan 1, 2018

  1. clang: move libclang to separate lib output

    Currently clang-unwrapped can't be used as a buildInput without also
    shadowing clang/clang++ of a clang based stdenv.
    LnL7 committed Jan 1, 2018

    Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    812f771 View commit details

Commits on Jan 2, 2018

  1. Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    b0c043d View commit details

Commits on Jan 7, 2018

  1. Merge pull request #33342 from LnL7/clang-outputs

    clang: add lib output
    LnL7 authored Jan 7, 2018
    Copy the full SHA
    e66a5f8 View commit details
6 changes: 4 additions & 2 deletions pkgs/development/compilers/llvm/3.8/clang/default.nix
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ let
sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' lib/Driver/ToolChains.cpp
'';

outputs = [ "out" "python" ];
outputs = [ "out" "lib" "python" ];

# Clang expects to find LLVMgold in its own prefix
# Clang expects to find sanitizer libraries in its own prefix
@@ -38,6 +38,9 @@ let
ln -sv ${llvm}/lib/clang/${version}/lib $out/lib/clang/${version}/
ln -sv $out/bin/clang $out/bin/cpp
# Move libclang to 'lib' output
moveToOutput "lib/libclang.*" "$lib"
mkdir -p $python/bin $python/share/clang/
mv $out/bin/{git-clang-format,scan-view} $python/bin
if [ -e $out/bin/set-xcode-analyzer ]; then
@@ -51,7 +54,6 @@ let
enableParallelBuilding = true;

passthru = {
lib = self; # compatibility with gcc, so that `stdenv.cc.cc.lib` works on both
isClang = true;
inherit llvm;
} // stdenv.lib.optionalAttrs stdenv.isLinux {
2 changes: 2 additions & 0 deletions pkgs/development/compilers/llvm/3.8/default.nix
Original file line number Diff line number Diff line change
@@ -22,6 +22,8 @@ let
inherit clang-tools-extra_src stdenv;
};

libclang = self.clang-unwrapped.lib;

clang = if stdenv.cc.isGNU then self.libstdcxxClang else self.libcxxClang;

libstdcxxClang = ccWrapperFun {
6 changes: 4 additions & 2 deletions pkgs/development/compilers/llvm/3.9/clang/default.nix
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ let
sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' lib/Driver/ToolChains.cpp
'';

outputs = [ "out" "python" ];
outputs = [ "out" "lib" "python" ];

# Clang expects to find LLVMgold in its own prefix
# Clang expects to find sanitizer libraries in its own prefix
@@ -40,6 +40,9 @@ let
ln -sv ${llvm}/lib/clang/${version}/lib $out/lib/clang/${version}/
ln -sv $out/bin/clang $out/bin/cpp
# Move libclang to 'lib' output
moveToOutput "lib/libclang.*" "$lib"
mkdir -p $python/bin $python/share/clang/
mv $out/bin/{git-clang-format,scan-view} $python/bin
if [ -e $out/bin/set-xcode-analyzer ]; then
@@ -53,7 +56,6 @@ let
enableParallelBuilding = true;

passthru = {
lib = self; # compatibility with gcc, so that `stdenv.cc.cc.lib` works on both
isClang = true;
inherit llvm;
} // stdenv.lib.optionalAttrs stdenv.isLinux {
2 changes: 2 additions & 0 deletions pkgs/development/compilers/llvm/3.9/default.nix
Original file line number Diff line number Diff line change
@@ -22,6 +22,8 @@ let
inherit clang-tools-extra_src stdenv;
};

libclang = self.clang-unwrapped.lib;

clang = if stdenv.cc.isGNU then self.libstdcxxClang else self.libcxxClang;

libstdcxxClang = ccWrapperFun {
7 changes: 4 additions & 3 deletions pkgs/development/compilers/llvm/4/clang/default.nix
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ let
sed -i '1s,^,find_package(Sphinx REQUIRED)\n,' docs/CMakeLists.txt
'';

outputs = [ "out" "python" ]
outputs = [ "out" "lib" "python" ]
++ stdenv.lib.optional enableManpages "man";

# Clang expects to find LLVMgold in its own prefix
@@ -59,13 +59,15 @@ let
ln -sv ${llvm}/lib/clang/${release_version}/lib $out/lib/clang/${release_version}/
ln -sv $out/bin/clang $out/bin/cpp
# Move libclang to 'lib' output
moveToOutput "lib/libclang.*" "$lib"
mkdir -p $python/bin $python/share/clang/
mv $out/bin/{git-clang-format,scan-view} $python/bin
if [ -e $out/bin/set-xcode-analyzer ]; then
mv $out/bin/set-xcode-analyzer $python/bin
fi
mv $out/share/clang/*.py $python/share/clang
rm $out/bin/c-index-test
''
+ stdenv.lib.optionalString enableManpages ''
@@ -79,7 +81,6 @@ let
enableParallelBuilding = true;

passthru = {
lib = self; # compatibility with gcc, so that `stdenv.cc.cc.lib` works on both
isClang = true;
inherit llvm;
} // stdenv.lib.optionalAttrs stdenv.isLinux {
1 change: 1 addition & 0 deletions pkgs/development/compilers/llvm/4/default.nix
Original file line number Diff line number Diff line change
@@ -34,6 +34,7 @@ let
llvm = overrideManOutput llvm;
clang-unwrapped = overrideManOutput clang-unwrapped;

libclang = self.clang-unwrapped.lib;
llvm-manpages = lowPrio self.llvm.man;
clang-manpages = lowPrio self.clang-unwrapped.man;

7 changes: 4 additions & 3 deletions pkgs/development/compilers/llvm/5/clang/default.nix
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@ let
sed -i '1s,^,find_package(Sphinx REQUIRED)\n,' docs/CMakeLists.txt
'';

outputs = [ "out" "python" ]
outputs = [ "out" "lib" "python" ]
++ stdenv.lib.optional enableManpages "man";

# Clang expects to find LLVMgold in its own prefix
@@ -60,13 +60,15 @@ let
ln -sv ${llvm}/lib/clang/${release_version}/lib $out/lib/clang/${release_version}/
ln -sv $out/bin/clang $out/bin/cpp
# Move libclang to 'lib' output
moveToOutput "lib/libclang.*" "$lib"
mkdir -p $python/bin $python/share/clang/
mv $out/bin/{git-clang-format,scan-view} $python/bin
if [ -e $out/bin/set-xcode-analyzer ]; then
mv $out/bin/set-xcode-analyzer $python/bin
fi
mv $out/share/clang/*.py $python/share/clang
rm $out/bin/c-index-test
''
+ stdenv.lib.optionalString enableManpages ''
@@ -80,7 +82,6 @@ let
enableParallelBuilding = true;

passthru = {
lib = self; # compatibility with gcc, so that `stdenv.cc.cc.lib` works on both
isClang = true;
inherit llvm;
} // stdenv.lib.optionalAttrs stdenv.isLinux {
1 change: 1 addition & 0 deletions pkgs/development/compilers/llvm/5/default.nix
Original file line number Diff line number Diff line change
@@ -34,6 +34,7 @@ let
llvm = overrideManOutput llvm;
clang-unwrapped = overrideManOutput clang-unwrapped;

libclang = self.clang-unwrapped.lib;
llvm-manpages = lowPrio self.llvm.man;
clang-manpages = lowPrio self.clang-unwrapped.man;

2 changes: 1 addition & 1 deletion pkgs/stdenv/darwin/default.nix
Original file line number Diff line number Diff line change
@@ -375,7 +375,7 @@ in rec {
xz.out xz.bin libcxx libcxxabi gmp.out gnumake findutils bzip2.out
bzip2.bin llvmPackages.llvm llvmPackages.llvm.lib zlib.out zlib.dev libffi.out coreutils ed diffutils gnutar
gzip ncurses.out ncurses.dev ncurses.man gnused bash gawk
gnugrep llvmPackages.clang-unwrapped patch pcre.out gettext
gnugrep llvmPackages.clang-unwrapped llvmPackages.clang-unwrapped.lib patch pcre.out gettext
binutils-raw.bintools binutils binutils.bintools
cc.expand-response-params
]) ++ (with pkgs.darwin; [