Merge pull request #133191 from Stunkymonkey/intel-graphics-compiler-phases

intel-graphics-compiler: deprecate phases and replace it with runComm…
This commit is contained in:
Timothy DeHerrera 2021-08-08 17:34:03 -06:00 committed by GitHub
commit 6ef4f522d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,8 +1,8 @@
{ lib, stdenv
{ lib
, stdenv
, fetchFromGitHub
, cmake
, pkg-config
, runCommandLocal
, bison
, flex
, llvmPackages_8
@ -46,18 +46,14 @@ stdenv.mkDerivation rec {
doCheck = false;
# Handholding the braindead build script
# We put this in a derivation because the cmake requires an absolute path
prebuilds = stdenv.mkDerivation {
name = "igc-cclang-prebuilds";
phases = [ "installPhase" ];
installPhase = ''
# cmake requires an absolute path
prebuilds = runCommandLocal "igc-cclang-prebuilds" { } ''
mkdir $out
ln -s ${clang}/bin/clang $out/
ln -s clang $out/clang-${versions.major (getVersion clang)}
ln -s ${opencl-clang}/lib/* $out/
ln -s ${lib.getLib libclang}/lib/clang/${getVersion clang}/include/opencl-c.h $out/
'';
};
cmakeFlags = [
"-DCCLANG_BUILD_PREBUILDS=ON"