diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-02-24 05:35:53 +0100 |
---|---|---|
committer | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-02-24 05:35:53 +0100 |
commit | 023bc57dcc9a464314da2740ef056a740726f6ef (patch) | |
tree | b0eb2006e92365ae7edb7511bffa05e7f20eccae /pkgs/development/compilers/llvm | |
parent | badc23b597a7340c38b33857bd3809c8518974d9 (diff) |
llvmPackages_17.mlir: cleanup
Diffstat (limited to 'pkgs/development/compilers/llvm')
-rw-r--r-- | pkgs/development/compilers/llvm/common/mlir/default.nix | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/pkgs/development/compilers/llvm/common/mlir/default.nix b/pkgs/development/compilers/llvm/common/mlir/default.nix index 8e99fa0fe337f..7a79ac30ba864 100644 --- a/pkgs/development/compilers/llvm/common/mlir/default.nix +++ b/pkgs/development/compilers/llvm/common/mlir/default.nix @@ -17,22 +17,28 @@ stdenv.mkDerivation rec { src = runCommand "${pname}-src-${version}" {} '' mkdir -p "$out" cp -r ${monorepoSrc}/cmake "$out" - cp -r ${monorepoSrc}/${pname} "$out" + cp -r ${monorepoSrc}/mlir "$out" cp -r ${monorepoSrc}/third-party "$out/third-party" mkdir -p "$out/llvm" ''; - sourceRoot = "${src.name}/${pname}"; + sourceRoot = "${src.name}/mlir"; patches = [ ./gnu-install-dirs.patch ]; - nativeBuildInputs = [ cmake ninja ]; - buildInputs = [ libllvm libxml2 ]; + nativeBuildInputs = [ + cmake + ninja + ]; + + buildInputs = [ + libllvm + libxml2 + ]; - ninjaFlags = [ "-v " ]; cmakeFlags = [ "-DLLVM_BUILD_TOOLS=ON" # Install headers as well @@ -45,11 +51,11 @@ stdenv.mkDerivation rec { "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}" "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}" "-DLLVM_ENABLE_DUMP=ON" - ] ++ lib.optionals stdenv.hostPlatform.isStatic [ + ] ++ lib.optionals stdenv.hostPlatform.isStatic [ # Disables building of shared libs, -fPIC is still injected by cc-wrapper "-DLLVM_ENABLE_PIC=OFF" "-DLLVM_BUILD_STATIC=ON" - "-DLLVM_LINK_LLVM_DYLIB=off" + "-DLLVM_LINK_LLVM_DYLIB=OFF" ] ++ lib.optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [ "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen" "-DMLIR_TABLEGEN_EXE=${buildLlvmTools.mlir}/bin/mlir-tblgen" |