<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/62214>62214</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [MLIR] Fail to run test `Integration/Dialect/Memref/memref_abi.c`
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Avimitin
      </td>
    </tr>
</table>

<pre>
    ## Summary

The test `memref_abi.c` fail to execute command 

```bash
llc /home/avimitin/llvm-project/build/tools/mlir/test/Integration/Dialect/Memref/Output/memref_abi.c.tmp.ll -o /home/avimitin/llvm-project/build/tools/mlir/test/Integration/Dialect/Memref/Output/memref_abi.c.tmp.o -filetype=obj
```

with the following error: `llc: error: unable to get target for '', see --version and --triple.`. The test is built and ran in docker environment.

## Environment

Docker image: `archlinux:latest`
OS Info: x86_64 Linux

## CMake build script

```bash
cmake -G Ninja ../llvm \
 -DLLVM_ENABLE_PROJECTS=mlir \
        -DLLVM_BUILD_EXAMPLES=ON \
 -DLLVM_TARGETS_TO_BUILD="X86;NVPTX;AMDGPU" \
 -DCMAKE_BUILD_TYPE=Release \
        -DLLVM_ENABLE_ASSERTIONS=ON \
 -DCMAKE_C_COMPILER=clang \
        -DCMAKE_CXX_COMPILER=clang++ \
        -DLLVM_ENABLE_LLD=ON \
 -DLLVM_USE_SANITIZER="Address;Undefined" \
 -DMLIR_INCLUDE_INTEGRATION_TESTS=ON
cmake --build . --target check-mlir
```

## Full log about the error test

```text
FAIL: MLIR :: Integration/Dialect/Memref/memref_abi.c (1 of 1911)
******************** TEST 'MLIR :: Integration/Dialect/Memref/memref_abi.c' FAILED ********************
Script:
--
: 'RUN: at line 2';   split-file /home/avimitin/llvm-project/mlir/test/Integration/Dialect/Memref/memref_abi.c /home/avimitin/llvm-project/build/tools/mlir/test/Integration/Dialect/Memref/Output/memref_abi.c.tmp
: 'RUN: at line 5';   /home/avimitin/llvm-project/build/bin/mlir-opt /home/avimitin/llvm-project/build/tools/mlir/test/Integration/Dialect/Memref/Output/memref_abi.c.tmp/input.mlir -lower-affine  -convert-scf-to-cf  -finalize-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts  | /home/avimitin/llvm-project/build/bin/mlir-translate --mlir-to-llvmir -o /home/avimitin/llvm-project/build/tools/mlir/test/Integration/Dialect/Memref/Output/memref_abi.c.tmp.ll
: 'RUN: at line 11';   llc /home/avimitin/llvm-project/build/tools/mlir/test/Integration/Dialect/Memref/Output/memref_abi.c.tmp.ll -o /home/avimitin/llvm-project/build/tools/mlir/test/Integration/Dialect/Memref/Output/memref_abi.c.tmp.o -filetype=obj
: 'RUN: at line 14';   /usr/bin/clang /home/avimitin/llvm-project/mlir/test/Integration/Dialect/Memref/memref_abi.c /home/avimitin/llvm-project/build/tools/mlir/test/Integration/Dialect/Memref/Output/memref_abi.c.tmp.o -o /home/avimitin/llvm-project/build/tools/mlir/test/Integration/Dialect/Memref/Output/memref_abi.c.tmp.exe
: 'RUN: at line 17'; /home/avimitin/llvm-project/build/tools/mlir/test/Integration/Dialect/Memref/Output/memref_abi.c.tmp.exe | /home/avimitin/llvm-project/build/bin/FileCheck /home/avimitin/llvm-project/mlir/test/Integration/Dialect/Memref/memref_abi.c
--
Exit Code: 1

Command Output (stderr):
--
llc: error: unable to get target for '', see --version and --triple.

--
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsV19v4jgQ_zTmZRQUHELpAw-BJBV3QCugq969ICeZgHcdG9lO271Pf3KSZemf3b3t3anS6aqoJPbY_s3Mb8YzzBi-l4gTEk5JGPdYbQ9KT6J7XnHLZS9TxecJoQGhAWzqqmL6M_Fj4kft_-0BwaKxQEZ-hZXGcscy3s_JyIeScQFWAT5iXluEXFUVkwWcrycjv30yZg7tkBA5EJoeVIWEpqwDQmgqxH3lHbX6iLklNM1qLgpCU6uUMISmle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