diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2024-03-02 12:01:28 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-02 12:01:28 +0000 |
commit | f51807feea1334c25a24de52154b35271feda13c (patch) | |
tree | 3be40b4b2ec9809037e8f74df32cedbb72e50e00 /pkgs/development/compilers/llvm | |
parent | aefac840b87e8e0ab658fa5080539e292ad8a9ba (diff) | |
parent | 4e6904ee82c5c40eba5d9b3198df1ae9223cb7e9 (diff) |
Merge master into staging-next
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" |