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: 1f407a46d60d
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 779ec144020d
Choose a head ref
  • 4 commits
  • 7 files changed
  • 2 contributors

Commits on May 19, 2017

  1. Copy the full SHA
    9aa3548 View commit details
  2. Copy the full SHA
    3d1c1c5 View commit details

Commits on May 21, 2017

  1. Copy the full SHA
    1e23b49 View commit details

Commits on May 28, 2017

  1. Merge pull request #25921 from dtzWill/feature/llvm-manpages

    llvm-4/clang-4: Build and install man pages
    LnL7 authored May 28, 2017
    Copy the full SHA
    779ec14 View commit details
23 changes: 21 additions & 2 deletions pkgs/development/compilers/llvm/4/clang/default.nix
Original file line number Diff line number Diff line change
@@ -13,23 +13,36 @@ let
mv clang-tools-extra-* $sourceRoot/tools/extra
'';

buildInputs = [ cmake libedit libxml2 llvm python ];
nativeBuildInputs = [ cmake python python.pkgs.sphinx ];
buildInputs = [ libedit libxml2 llvm ];

cmakeFlags = [
"-DCMAKE_CXX_FLAGS=-std=c++11"
"-DCLANG_INCLUDE_DOCS=ON"
"-DLLVM_ENABLE_SPHINX=ON"
"-DSPHINX_OUTPUT_MAN=ON"
"-DSPHINX_OUTPUT_HTML=OFF"
"-DSPHINX_WARNINGS_AS_ERRORS=OFF"
] ++
# Maybe with compiler-rt this won't be needed?
(stdenv.lib.optional stdenv.isLinux "-DGCC_INSTALL_PREFIX=${gcc}") ++
(stdenv.lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${stdenv.cc.libc}/include");

patches = [ ./purity.patch ];

postBuild = ''
cmake --build . --target docs-clang-man
'';

postPatch = ''
sed -i -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' lib/Driver/Tools.cpp
sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' lib/Driver/ToolChains.cpp
# Patch for standalone doc building
sed -i '1s,^,find_package(Sphinx REQUIRED)\n,' docs/CMakeLists.txt
'';

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

# Clang expects to find LLVMgold in its own prefix
# Clang expects to find sanitizer libraries in its own prefix
@@ -46,6 +59,12 @@ let
mv $out/share/clang/*.py $python/share/clang
rm $out/bin/c-index-test
# Manually install clang manpage
cp docs/man/*.1 $out/share/man/man1/
# Move it and other man pages to 'man' output
moveToOutput "share/man" "$man"
'';

enableParallelBuilding = true;
3 changes: 2 additions & 1 deletion pkgs/development/compilers/llvm/4/libc++abi.nix
Original file line number Diff line number Diff line change
@@ -5,7 +5,8 @@ stdenv.mkDerivation {

src = fetch "libcxxabi" "1n416kv27anabg9jsw6331r28ic30xk46p381lx2vbb2jrhwpafw";

buildInputs = [ cmake ] ++ stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD) libunwind;
nativeBuildInputs = [ cmake ];
buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD) libunwind;

postUnpack = ''
unpackFile ${libcxx.src}
3 changes: 2 additions & 1 deletion pkgs/development/compilers/llvm/4/lld.nix
Original file line number Diff line number Diff line change
@@ -12,7 +12,8 @@ stdenv.mkDerivation {

src = fetch "lld" "00km1qawk146pyjqa6aphcdzgkzrmg6cgk0ikg4661ffp5bn9q1k";

buildInputs = [ cmake llvm ];
nativeBuildInputs = [ cmake ];
buildInputs = [ llvm ];

outputs = [ "out" "dev" ];

3 changes: 2 additions & 1 deletion pkgs/development/compilers/llvm/4/lldb.nix
Original file line number Diff line number Diff line change
@@ -29,7 +29,8 @@ stdenv.mkDerivation {
cmake/modules/LLDBStandalone.cmake
'';

buildInputs = [ cmake python which swig ncurses zlib libedit libxml2 llvm ]
nativeBuildInputs = [ cmake python which swig ];
buildInputs = [ ncurses zlib libedit libxml2 llvm ]
++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc ];

CXXFLAGS = "-fno-rtti";
14 changes: 11 additions & 3 deletions pkgs/development/compilers/llvm/4/llvm.nix
Original file line number Diff line number Diff line change
@@ -38,9 +38,10 @@ in stdenv.mkDerivation rec {
mv compiler-rt-* $sourceRoot/projects/compiler-rt
'';

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

buildInputs = [ perl groff cmake libxml2 python libffi ]
nativeBuildInputs = [ perl groff cmake python python.pkgs.sphinx ];
buildInputs = [ libxml2 libffi ]
++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi ];

propagatedBuildInputs = [ ncurses zlib ];
@@ -80,6 +81,11 @@ in stdenv.mkDerivation rec {
"-DLLVM_ENABLE_FFI=ON"
"-DLLVM_ENABLE_RTTI=ON"
"-DCOMPILER_RT_INCLUDE_TESTS=OFF" # FIXME: requires clang source code
"-DLLVM_BUILD_DOCS=ON"
"-DLLVM_ENABLE_SPHINX=ON"
"-DSPHINX_OUTPUT_MAN=ON"
"-DSPHINX_OUTPUT_HTML=OFF"
"-DSPHINX_WARNINGS_AS_ERRORS=OFF"
] ++ stdenv.lib.optional enableSharedLibraries [
"-DLLVM_LINK_LLVM_DYLIB=ON"
] ++ stdenv.lib.optional (!isDarwin)
@@ -103,7 +109,9 @@ in stdenv.mkDerivation rec {
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib
'';

postInstall = ""
postInstall = ''
moveToOutput "share/man" "$man"
''
+ stdenv.lib.optionalString (enableSharedLibraries) ''
moveToOutput "lib/libLLVM-*" "$lib"
moveToOutput "lib/libLLVM.${shlib}" "$lib"
3 changes: 2 additions & 1 deletion pkgs/development/compilers/llvm/4/openmp.nix
Original file line number Diff line number Diff line change
@@ -12,7 +12,8 @@ stdenv.mkDerivation {

src = fetch "openmp" "09kf41zgv551fnv628kqhlwgqkd2bkiwii9gqi6q12djgdddhmfv";

buildInputs = [ cmake llvm perl ];
nativeBuildInputs = [ cmake perl ];
buildInputs = [ llvm ];

enableParallelBuilding = true;

2 changes: 1 addition & 1 deletion pkgs/stdenv/darwin/default.nix
Original file line number Diff line number Diff line change
@@ -313,7 +313,7 @@ in rec {
xz.out xz.bin libcxx libcxxabi icu.out 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 binutils-raw.out
gnugrep llvmPackages.clang-unwrapped llvmPackages.clang-unwrapped.man patch pcre.out binutils-raw.out
binutils-raw.dev binutils gettext
]) ++ (with pkgs.darwin; [
dyld Libsystem CF cctools libiconv locale