llvm-polly,clang-polly: Add llvm/clang variants w/polly support (#55065)
* llvm: build w/polly in-tree, optionally Don't enable by default yet, defer rebuilds. * top-level: llvm-polly, clang-polly * bit hacky re:overrides * need to explicitly set cmake flags for clang to link in polly
This commit is contained in:
parent
148e0f6de8
commit
ed60483257
4 changed files with 17 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python
|
||||
, fixDarwinDylibNames
|
||||
, enableManpages ? false
|
||||
, enablePolly ? false # TODO: get this info from llvm (passthru?)
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -30,6 +31,9 @@ let
|
|||
"-DSPHINX_OUTPUT_MAN=ON"
|
||||
"-DSPHINX_OUTPUT_HTML=OFF"
|
||||
"-DSPHINX_WARNINGS_AS_ERRORS=OFF"
|
||||
] ++ stdenv.lib.optionals enablePolly [
|
||||
"-DWITH_POLLY=ON"
|
||||
"-DLINK_POLLY_INTO_TOOLS=ON"
|
||||
];
|
||||
|
||||
patches = [ ./purity.patch ];
|
||||
|
|
|
@ -29,10 +29,16 @@ let
|
|||
in {
|
||||
|
||||
llvm = callPackage ./llvm.nix { };
|
||||
llvm-polly = callPackage ./llvm.nix { enablePolly = true; };
|
||||
|
||||
clang-unwrapped = callPackage ./clang {
|
||||
inherit clang-tools-extra_src;
|
||||
};
|
||||
clang-polly-unwrapped = callPackage ./clang {
|
||||
inherit clang-tools-extra_src;
|
||||
llvm = tools.llvm-polly;
|
||||
enablePolly = true;
|
||||
};
|
||||
|
||||
llvm-manpages = lowPrio (tools.llvm.override {
|
||||
enableManpages = true;
|
||||
|
|
|
@ -16,12 +16,14 @@
|
|||
, enableManpages ? false
|
||||
, enableSharedLibraries ? true
|
||||
, enablePFM ? !stdenv.isDarwin
|
||||
, enablePolly ? false
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (stdenv.lib) optional optionals optionalString;
|
||||
|
||||
src = fetch "llvm" "16s196wqzdw4pmri15hadzqgdi926zln3an2viwyq0kini6zr3d3";
|
||||
polly_src = fetch "polly" "0wgvayfilgb530bq51l7szxfb13l24nnrmyji2f6ncq95a24dw8v";
|
||||
|
||||
# Used when creating a version-suffixed symlink of libLLVM.dylib
|
||||
shortVersion = with stdenv.lib;
|
||||
|
@ -34,6 +36,9 @@ in stdenv.mkDerivation (rec {
|
|||
unpackFile ${src}
|
||||
mv llvm-${version}* llvm
|
||||
sourceRoot=$PWD/llvm
|
||||
'' + optionalString enablePolly ''
|
||||
unpackFile ${polly_src}
|
||||
mv polly-* $sourceRoot/tools/polly
|
||||
'';
|
||||
|
||||
outputs = [ "out" "python" ]
|
||||
|
|
|
@ -6684,6 +6684,8 @@ in
|
|||
useMacosReexportHack = true;
|
||||
};
|
||||
};
|
||||
llvm-polly = llvmPackages_7.llvm-polly;
|
||||
clang-polly = clang_7.override { cc = llvmPackages_7.clang-polly-unwrapped; };
|
||||
|
||||
clang_7 = llvmPackages_7.clang;
|
||||
clang_6 = llvmPackages_6.clang;
|
||||
|
|
Loading…
Reference in a new issue