forked from rarias/bscpkgs
intel: add intel compiler 2021.2.0
This commit is contained in:
26
bsc/intel-compiler/wrapper2021.nix
Normal file
26
bsc/intel-compiler/wrapper2021.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
stdenv
|
||||
, gcc
|
||||
, iccUnwrapped
|
||||
, wrapCCWith
|
||||
}:
|
||||
|
||||
let
|
||||
targetConfig = stdenv.targetPlatform.config;
|
||||
inherit gcc;
|
||||
in wrapCCWith rec {
|
||||
cc = iccUnwrapped;
|
||||
extraBuildCommands = ''
|
||||
echo "-B${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-cflags
|
||||
echo "-isystem ${iccUnwrapped}/include" >> $out/nix-support/cc-cflags
|
||||
echo "-isystem ${iccUnwrapped}/include/icc" >> $out/nix-support/cc-cflags
|
||||
echo "-L${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-ldflags
|
||||
echo "-L${gcc.cc.lib}/lib" >> $out/nix-support/cc-ldflags
|
||||
|
||||
# Create the wrappers for icc and icpc
|
||||
wrap icx $wrapper $ccPath/icx
|
||||
wrap icx $wrapper $ccPath/icpx
|
||||
wrap icx $wrapper $ccPath/clang
|
||||
wrap icx $wrapper $ccPath/clang++
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user