diff options
author | Will Dietz | 2019-02-25 15:20:52 -0600 |
---|---|---|
committer | GitHub | 2019-02-25 15:20:52 -0600 |
commit | ed60483257b62c32b5b58c6e91c9c8cd586f77d0 (patch) | |
tree | 2d7721f02ca2136796e5488a275e17c5365a04ec /pkgs/development | |
parent | 148e0f6de8af1434b437b33e8e3e610be14f84c0 (diff) |
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
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/compilers/llvm/7/clang/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/7/default.nix | 6 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/7/llvm.nix | 5 |
3 files changed, 15 insertions, 0 deletions
diff --git a/pkgs/development/compilers/llvm/7/clang/default.nix b/pkgs/development/compilers/llvm/7/clang/default.nix index bc6767e8766e..e2aceb79bfae 100644 --- a/pkgs/development/compilers/llvm/7/clang/default.nix +++ b/pkgs/development/compilers/llvm/7/clang/default.nix @@ -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 ]; diff --git a/pkgs/development/compilers/llvm/7/default.nix b/pkgs/development/compilers/llvm/7/default.nix index 3f1192d96263..55a177fa1aa6 100644 --- a/pkgs/development/compilers/llvm/7/default.nix +++ b/pkgs/development/compilers/llvm/7/default.nix @@ -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; diff --git a/pkgs/development/compilers/llvm/7/llvm.nix b/pkgs/development/compilers/llvm/7/llvm.nix index 5bb629931fd5..fa5c48ec3eae 100644 --- a/pkgs/development/compilers/llvm/7/llvm.nix +++ b/pkgs/development/compilers/llvm/7/llvm.nix @@ -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" ] |