···20, Cocoa
21, lit
22, makeWrapper
23+, darwin
24, enableManpages ? false
25}:
26···39 substitute '${./resource-dir.patch}' "$out" --subst-var clangLibDir
40 '')
41 ./gnu-install-dirs.patch
42+ ]
43+ # This is a stopgap solution if/until the macOS SDK used for x86_64 is
44+ # updated.
45+ #
46+ # The older 10.12 SDK used on x86_64 as of this writing has a `mach/machine.h`
47+ # header that does not define `CPU_SUBTYPE_ARM64E` so we replace the one use
48+ # of this preprocessor symbol in `lldb` with its expansion.
49+ #
50+ # See here for some context:
51+ # https://github.com/NixOS/nixpkgs/pull/194634#issuecomment-1272129132
52+ ++ lib.optional (
53+ stdenv.targetPlatform.isDarwin
54+ && !stdenv.targetPlatform.isAarch64
55+ && (lib.versionOlder darwin.apple_sdk.sdk.version "11.0")
56+ ) ./cpu_subtype_arm64e_replacement.patch;
57+5859 outputs = [ "out" "lib" "dev" ];
60···118 '';
119120 meta = llvm_meta // {
0121 homepage = "https://lldb.llvm.org/";
122 description = "A next-generation high-performance debugger";
123 longDescription = ''
···20, Cocoa
21, lit
22, makeWrapper
23+, darwin
24, enableManpages ? false
25, lua5_3
26}:
···45 substitute '${./resource-dir.patch}' "$out" --subst-var clangLibDir
46 '')
47 ./gnu-install-dirs.patch
48+ ]
49+ # This is a stopgap solution if/until the macOS SDK used for x86_64 is
50+ # updated.
51+ #
52+ # The older 10.12 SDK used on x86_64 as of this writing has a `mach/machine.h`
53+ # header that does not define `CPU_SUBTYPE_ARM64E` so we replace the one use
54+ # of this preprocessor symbol in `lldb` with its expansion.
55+ #
56+ # See here for some context:
57+ # https://github.com/NixOS/nixpkgs/pull/194634#issuecomment-1272129132
58+ ++ lib.optional (
59+ stdenv.targetPlatform.isDarwin
60+ && !stdenv.targetPlatform.isAarch64
61+ && (lib.versionOlder darwin.apple_sdk.sdk.version "11.0")
62+ ) ./cpu_subtype_arm64e_replacement.patch;
6364 outputs = [ "out" "lib" "dev" ];
65···131 larger LLVM Project, such as the Clang expression parser and LLVM
132 disassembler.
133 '';
0134 };
135} // lib.optionalAttrs enableManpages {
136 pname = "lldb-manpages";