diff --git a/pkgs/development/compilers/llvm/common/lldb.nix b/pkgs/development/compilers/llvm/common/lldb.nix index 4cb73a4d97a6..59e427e846c4 100644 --- a/pkgs/development/compilers/llvm/common/lldb.nix +++ b/pkgs/development/compilers/llvm/common/lldb.nix @@ -5,7 +5,8 @@ , cmake , zlib , ncurses -, swig +, swig3 +, swig4 , which , libedit , libxml2 @@ -34,6 +35,11 @@ let cp -r ${monorepoSrc}/cmake "$out" cp -r ${monorepoSrc}/lldb "$out" '' else src; + vscodeExt = { + name = if lib.versionAtLeast release_version "18" then "lldb-dap" else "lldb-vscode"; + version = if lib.versionAtLeast release_version "18" then "0.2.0" else "0.1.0"; + }; + swig = if lib.versionAtLeast release_version "18" then swig4 else swig3; in stdenv.mkDerivation (rec { @@ -58,7 +64,10 @@ stdenv.mkDerivation (rec { lua5_3 ] ++ lib.optionals enableManpages [ python3.pkgs.sphinx + ] ++ lib.optionals (lib.versionOlder release_version "18" && enableManpages) [ python3.pkgs.recommonmark + ] ++ lib.optionals (lib.versionAtLeast release_version "18" && enableManpages) [ + python3.pkgs.myst-parser ] ++ lib.optionals (lib.versionAtLeast release_version "14") [ ninja ]; @@ -154,14 +163,14 @@ stdenv.mkDerivation (rec { # Editor support # vscode: - install -D ../tools/lldb-vscode/package.json $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/package.json - mkdir -p $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin - ln -s $out/bin/*-vscode $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin + install -D ../tools/${vscodeExt.name}/package.json $out/share/vscode/extensions/llvm-org.${vscodeExt.name}-${vscodeExt.version}/package.json + mkdir -p $out/share/vscode/extensions/llvm-org.${vscodeExt.name}-${vscodeExt.version}/bin + ln -s $out/bin/*${if lib.versionAtLeast release_version "18" then vscodeExt.name else "-vscode"} $out/share/vscode/extensions/llvm-org.${vscodeExt.name}-${vscodeExt.version}/bin ''; - passthru.vscodeExtName = "lldb-vscode"; + passthru.vscodeExtName = vscodeExt.name; passthru.vscodeExtPublisher = "llvm"; - passthru.vscodeExtUniqueId = "llvm-org.lldb-vscode-0.1.0"; + passthru.vscodeExtUniqueId = "llvm-org.${vscodeExt.name}-${vscodeExt.version}"; meta = llvm_meta // { homepage = "https://lldb.llvm.org/"; diff --git a/pkgs/development/compilers/llvm/git/clang/default.nix b/pkgs/development/compilers/llvm/git/clang/default.nix index d8fe08569f3f..fff39fa9cea0 100644 --- a/pkgs/development/compilers/llvm/git/clang/default.nix +++ b/pkgs/development/compilers/llvm/git/clang/default.nix @@ -21,6 +21,7 @@ let sourceRoot = "${src.name}/${pname}"; nativeBuildInputs = [ cmake ninja python3 ] + ++ lib.optional (lib.versionAtLeast version "18" && enableManpages) python3.pkgs.myst-parser ++ lib.optional enableManpages python3.pkgs.sphinx ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; @@ -70,7 +71,7 @@ let ln -sv $out/bin/clang $out/bin/cpp mkdir -p $lib/lib/clang - mv $lib/lib/18 $lib/lib/clang/18 + mv $lib/lib/${lib.versions.major version} $lib/lib/clang/${lib.versions.major version} # Move libclang to 'lib' output moveToOutput "lib/libclang.*" "$lib" diff --git a/pkgs/development/compilers/llvm/git/clang/purity.patch b/pkgs/development/compilers/llvm/git/clang/purity.patch index 1c94f293eb93..5ce14a3479a0 100644 --- a/pkgs/development/compilers/llvm/git/clang/purity.patch +++ b/pkgs/development/compilers/llvm/git/clang/purity.patch @@ -4,26 +4,22 @@ Date: Thu, 18 May 2017 11:56:12 -0500 Subject: [PATCH] "purity" patch for 5.0 --- - lib/Driver/ToolChains/Gnu.cpp | 7 ------- - 1 file changed, 7 deletions(-) + lib/Driver/ToolChains/Gnu.cpp | 3 --- + 1 file changed, 3 deletions(-) diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp index fe3c0191bb..c6a482bece 100644 --- a/lib/Driver/ToolChains/Gnu.cpp +++ b/lib/Driver/ToolChains/Gnu.cpp -@@ -487,13 +487,7 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, - } else { - if (Args.hasArg(options::OPT_rdynamic)) - CmdArgs.push_back("-export-dynamic"); - -- if (!Args.hasArg(options::OPT_shared) && !IsStaticPIE && -- !Args.hasArg(options::OPT_r)) { +@@ -446,9 +446,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, + ToolChain.isPIEDefault(Args)); + if (IsPIE) + CmdArgs.push_back("-pie"); - CmdArgs.push_back("-dynamic-linker"); - CmdArgs.push_back(Args.MakeArgString(Twine(D.DyldPrefix) + - ToolChain.getDynamicLinker(Args))); -- } + } } - CmdArgs.push_back("-o"); -- 2.11.0 diff --git a/pkgs/development/compilers/llvm/git/default.nix b/pkgs/development/compilers/llvm/git/default.nix index efa8daf5d98b..7dfec234104d 100644 --- a/pkgs/development/compilers/llvm/git/default.nix +++ b/pkgs/development/compilers/llvm/git/default.nix @@ -19,9 +19,9 @@ # LLVM release information; specify one of these but not both: , gitRelease ? { version = "18.0.0"; - rev = "6f44f87011cd52367626cac111ddbb2d25784b90"; - rev-version = "18.0.0-unstable-2023-10-04"; - sha256 = "sha256-CqsCDlzg8I2c9BybKP7B5nfHiQWktqgVavrfiYkjkx4="; + rev = "2fd7657b6609454af7adb75765d164ec7d1bb80b"; + rev-version = "18.0.0-unstable-2023-12-13"; + sha256 = "sha256-/sMQzzFid0tAnreOIV9SUm2H6QbEGhpNcizl3LDPM5s="; } # i.e.: # { diff --git a/pkgs/development/compilers/llvm/git/llvm/default.nix b/pkgs/development/compilers/llvm/git/llvm/default.nix index a6e9f9289d03..3c52b7a9bb0b 100644 --- a/pkgs/development/compilers/llvm/git/llvm/default.nix +++ b/pkgs/development/compilers/llvm/git/llvm/default.nix @@ -86,10 +86,14 @@ stdenv.mkDerivation (rec { nativeBuildInputs = [ cmake ninja python ] ++ optionals enableManpages [ - # Note: we intentionally use `python3Packages` instead of `python3.pkgs`; - # splicing does *not* work with the latter. (TODO: fix) - python3Packages.sphinx python3Packages.recommonmark - ]; + # Note: we intentionally use `python3Packages` instead of `python3.pkgs`; + # splicing does *not* work with the latter. (TODO: fix) + python3Packages.sphinx + ] ++ optionals (lib.versionOlder version "18" && enableManpages) [ + python3Packages.recommonmark + ] ++ optionals (lib.versionAtLeast version "18" && enableManpages) [ + python3Packages.myst-parser + ]; buildInputs = [ libxml2 libffi ] ++ optional enablePFM libpfm; # exegesis