mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-29 03:10:19 +00:00
bcc: remove refs to LLVM static libs that bloated closure (#562660)
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
nixosTests,
|
||||
python3Packages,
|
||||
readline,
|
||||
removeReferencesTo,
|
||||
replaceVars,
|
||||
zip,
|
||||
}:
|
||||
@@ -55,6 +56,7 @@ python3Packages.buildPythonApplication rec {
|
||||
flex
|
||||
llvmPackages.llvm
|
||||
makeWrapper
|
||||
removeReferencesTo
|
||||
zip
|
||||
];
|
||||
|
||||
@@ -112,8 +114,17 @@ python3Packages.buildPythonApplication rec {
|
||||
|
||||
postFixup = ''
|
||||
wrapPythonProgramsIn "$out/share/bcc/tools" "$out ''${pythonPath[*]}"
|
||||
''
|
||||
# Remove string refs to LLVM static libs that are unused at runtime and bloat closure by 2G
|
||||
+ ''
|
||||
remove-references-to -t ${lib.getLib llvmPackages.llvm} -t ${lib.getLib llvmPackages.libclang} $out/lib/libbcc.so.*
|
||||
'';
|
||||
|
||||
disallowedReferences = [
|
||||
(lib.getLib llvmPackages.llvm)
|
||||
(lib.getLib llvmPackages.libclang)
|
||||
];
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"man"
|
||||
|
||||
Reference in New Issue
Block a user