diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-12-15 19:32:38 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-12-15 19:32:38 +0100 |
commit | 6b8e2555ef013b579cda57025b17d662e0f1fe1f (patch) | |
tree | 5a83c673af26c9976acd5a5dfa20e09e06898047 /nixpkgs/pkgs/development/compilers/llvm/git/clang/default.nix | |
parent | 66ca7a150b5c051f0728f13134e6265cc46f370c (diff) | |
parent | 02357adddd0889782362d999628de9d309d202dc (diff) | |
download | nixlib-6b8e2555ef013b579cda57025b17d662e0f1fe1f.tar nixlib-6b8e2555ef013b579cda57025b17d662e0f1fe1f.tar.gz nixlib-6b8e2555ef013b579cda57025b17d662e0f1fe1f.tar.bz2 nixlib-6b8e2555ef013b579cda57025b17d662e0f1fe1f.tar.lz nixlib-6b8e2555ef013b579cda57025b17d662e0f1fe1f.tar.xz nixlib-6b8e2555ef013b579cda57025b17d662e0f1fe1f.tar.zst nixlib-6b8e2555ef013b579cda57025b17d662e0f1fe1f.zip |
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/llvm/git/clang/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/compilers/llvm/git/clang/default.nix | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/clang/default.nix b/nixpkgs/pkgs/development/compilers/llvm/git/clang/default.nix index 733f5462d320..b193ebba3d6d 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/git/clang/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/git/clang/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, llvm_meta , monorepoSrc, runCommand -, substituteAll, cmake, ninja, libxml2, libllvm, version, python3 +, cmake, ninja, libxml2, libllvm, version, python3 , buildLlvmTools , fixDarwinDylibNames , enableManpages ? false @@ -30,6 +30,7 @@ let "-DCLANG_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/clang" "-DCLANGD_BUILD_XPC=OFF" "-DLLVM_ENABLE_RTTI=ON" + "-DLLVM_INCLUDE_TESTS=OFF" ] ++ lib.optionals enableManpages [ "-DCLANG_INCLUDE_DOCS=ON" "-DLLVM_ENABLE_SPHINX=ON" @@ -51,10 +52,11 @@ let # https://reviews.llvm.org/D51899 ./gnu-install-dirs.patch ../../common/clang/add-nostdlibinc-flag.patch - (substituteAll { - src = ../../clang-11-12-LLVMgold-path.patch; - libllvmLibdir = "${libllvm.lib}/lib"; - }) + # FIMXE: do we need this patch? + # (substituteAll { + # src = ../../clang-11-12-LLVMgold-path.patch; + # libllvmLibdir = "${libllvm.lib}/lib"; + # }) ]; postPatch = '' @@ -65,15 +67,12 @@ let outputs = [ "out" "lib" "dev" "python" ]; - env = lib.optionalAttrs (stdenv.buildPlatform != stdenv.hostPlatform) { - # The following warning is triggered with (at least) gcc >= - # 12, but appears to occur only for cross compiles. - NIX_CFLAGS_COMPILE = "-Wno-maybe-uninitialized"; - }; - postInstall = '' ln -sv $out/bin/clang $out/bin/cpp + mkdir -p $lib/lib/clang + mv $lib/lib/18 $lib/lib/clang/18 + # Move libclang to 'lib' output moveToOutput "lib/libclang.*" "$lib" moveToOutput "lib/libclang-cpp.*" "$lib" @@ -81,13 +80,12 @@ let --replace "\''${_IMPORT_PREFIX}/lib/libclang." "$lib/lib/libclang." \ --replace "\''${_IMPORT_PREFIX}/lib/libclang-cpp." "$lib/lib/libclang-cpp." - mkdir -p $python/bin $python/share/{clang,scan-view} + 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 - mv $out/share/scan-view/*.py $python/share/scan-view rm $out/bin/c-index-test patchShebangs $python/bin |