diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-06-21 00:13:19 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-21 00:13:19 +0000 |
commit | 260df62919ffc7c09044edb519f3beaa491cda0e (patch) | |
tree | 0b2b34c12219860fd7d15b9cfeaf0d5148ffa9b5 /pkgs/development/compilers/llvm/14/default.nix | |
parent | 3780de2d515bae803de26545cf5891c211a9846b (diff) | |
parent | 2de5e6838cd1480b9f1eae11c1c65ca2f32ae40c (diff) |
Merge master into haskell-updates
Diffstat (limited to 'pkgs/development/compilers/llvm/14/default.nix')
-rw-r--r-- | pkgs/development/compilers/llvm/14/default.nix | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/pkgs/development/compilers/llvm/14/default.nix b/pkgs/development/compilers/llvm/14/default.nix index cf3cf1133e588..5a7651958027f 100644 --- a/pkgs/development/compilers/llvm/14/default.nix +++ b/pkgs/development/compilers/llvm/14/default.nix @@ -136,11 +136,36 @@ 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 |