diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-03-02 12:06:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-02 12:06:52 +0100 |
commit | 7e53a56302c71fe62cc3b3948f3725d2b71e9a9c (patch) | |
tree | ff53eaa67c8e250f8f22097fe77a0a5619759785 /pkgs/development/compilers/llvm | |
parent | 99b0b9a3c2f2131c329118b5fa62de48ccb9727a (diff) | |
parent | 023bc57dcc9a464314da2740ef056a740726f6ef (diff) |
Merge pull request #291050 from wegank/mlir-cleanup
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" |