mirror of
https://github.com/lifting-bits/remill
synced 2026-06-21 13:56:07 +00:00
fix: use full version for LLVM 15 clang resource dir
LLVM 16+ changed the resource directory path from lib/clang/<full-version> (e.g. 15.0.7) to lib/clang/<major> (e.g. 16). Use release_version from nixpkgs to match the upstream nixpkgs clang wrapper logic (D125860). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
committed by
Kyle Elliott
parent
6931fd44c0
commit
62f16fe143
@@ -95,6 +95,11 @@
|
||||
let
|
||||
llvmPkgs = pkgs.${"llvmPackages_${toString ver}"};
|
||||
majorStr = toString ver;
|
||||
# LLVM 16+ uses major-only version in resource dir (D125860)
|
||||
clangVersion =
|
||||
if lib.versionOlder llvmPkgs.release_version "16"
|
||||
then llvmPkgs.release_version
|
||||
else majorStr;
|
||||
in llvmPkgs.stdenv.mkDerivation {
|
||||
pname = "remill";
|
||||
version =
|
||||
@@ -125,7 +130,7 @@
|
||||
"-DFETCHCONTENT_FULLY_DISCONNECTED=ON"
|
||||
"-DCLANG_PATH:FILEPATH=${pkgs.writeShellScript "bc-clang" ''
|
||||
exec ${llvmPkgs.clang-unwrapped}/bin/clang++ \
|
||||
-resource-dir ${llvmPkgs.clang-unwrapped.lib}/lib/clang/${majorStr} \
|
||||
-resource-dir ${llvmPkgs.clang-unwrapped.lib}/lib/clang/${clangVersion} \
|
||||
"$@"
|
||||
''}"
|
||||
"-DGIT_FAIL_IF_NONZERO_EXIT=FALSE"
|
||||
|
||||
Reference in New Issue
Block a user