diff options
author | Artturi <Artturin@artturin.com> | 2023-06-20 16:43:41 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-20 16:43:41 +0300 |
commit | 289d9cf8a7d58086328e78cfc29b267596a0a2de (patch) | |
tree | 3cacacf2fe3bd6f5b6c2481c7ab2b80837cf5032 /pkgs/development/compilers/llvm/15/default.nix | |
parent | 2fd2dc90b0344da41ddc83c31e032fae3141832a (diff) | |
parent | d53d5a8b38f8ecbf75388a1582efd4c19e61d5da (diff) | |
download | nixpkgs-289d9cf8a7d58086328e78cfc29b267596a0a2de.tar nixpkgs-289d9cf8a7d58086328e78cfc29b267596a0a2de.tar.gz nixpkgs-289d9cf8a7d58086328e78cfc29b267596a0a2de.tar.bz2 nixpkgs-289d9cf8a7d58086328e78cfc29b267596a0a2de.tar.lz nixpkgs-289d9cf8a7d58086328e78cfc29b267596a0a2de.tar.xz nixpkgs-289d9cf8a7d58086328e78cfc29b267596a0a2de.tar.zst nixpkgs-289d9cf8a7d58086328e78cfc29b267596a0a2de.zip |
Merge pull request #230387 from Artturin/llvmsplit1
Diffstat (limited to 'pkgs/development/compilers/llvm/15/default.nix')
-rw-r--r-- | pkgs/development/compilers/llvm/15/default.nix | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/pkgs/development/compilers/llvm/15/default.nix b/pkgs/development/compilers/llvm/15/default.nix index 0e36ebb8abb..a9fee13d12b 100644 --- a/pkgs/development/compilers/llvm/15/default.nix +++ b/pkgs/development/compilers/llvm/15/default.nix @@ -184,11 +184,36 @@ in let inherit llvm_meta; }; - lldb = callPackage ./lldb { - inherit llvm_meta; - inherit (darwin) libobjc bootstrap_cmds; - inherit (darwin.apple_sdk.libs) xpc; - inherit (darwin.apple_sdk.frameworks) Foundation Carbon Cocoa; + lldb = callPackage ../common/lldb.nix { + patches = + let + resourceDirPatch = callPackage ({ runCommand, libclang }: (runCommand "resource-dir.patch" + { + clangLibDir = "${libclang.lib}/lib"; + } '' + substitute '${./lldb/resource-dir.patch}' "$out" --subst-var clangLibDir + '')) { }; + in + [ + ./lldb/procfs.patch + resourceDirPatch + ./lldb/gnu-install-dirs.patch + ] + # This is a stopgap solution if/until the macOS SDK used for x86_64 is + # updated. + # + # The older 10.12 SDK used on x86_64 as of this writing has a `mach/machine.h` + # header that does not define `CPU_SUBTYPE_ARM64E` so we replace the one use + # of this preprocessor symbol in `lldb` with its expansion. + # + # See here for some context: + # https://github.com/NixOS/nixpkgs/pull/194634#issuecomment-1272129132 + ++ lib.optional ( + stdenv.targetPlatform.isDarwin + && !stdenv.targetPlatform.isAarch64 + && (lib.versionOlder darwin.apple_sdk.sdk.version "11.0") + ) ./lldb/cpu_subtype_arm64e_replacement.patch; + inherit llvm_meta release_version; }; # Below, is the LLVM bootstrapping logic. It handles building a |