<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/111364>111364</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
MLIR standalone example fails Monolitic Build
</td>
</tr>
<tr>
<th>Labels</th>
<td>
mlir
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
PerMildner
</td>
</tr>
</table>
<pre>
Copied `llvm-project/mlir/examples/standalone/` (commit 5cfc6bc22b6284a2e0b78c71c84d272fcc8ac85) to a new directory and tried to follow the `README.md` for a "Monolithic Build" but **the tests fails because no `mlir-opt` has been built**:
```
me@myMac mlir-examples-standalone % mkdir build && cd build
me@myMac ( cd $LLVM_SRC_DIR && git rev-parse HEAD )
66713a0f8257661a8849e1a710a90b79576b0d21
me@myMac build % cmake -G Ninja $LLVM_SRC_DIR/llvm \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_TARGETS_TO_BUILD=host \
-DLLVM_ENABLE_PROJECTS=mlir \
-DLLVM_EXTERNAL_PROJECTS=standalone-dialect -DLLVM_EXTERNAL_STANDALONE_DIALECT_SOURCE_DIR=../
> > > > CMake Deprecation Warning at .../git/llvm-project/cmake/Modules/CMakePolicy.cmake:6 (cmake_policy):
...
-- The C compiler identification is AppleClang 15.0.0.15000309
...
-- Build files have been written to: .../git/mlir-examples-standalone/build
me@myMac build % cmake --build . --target check-standalone
[1/3322] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/AutoConvert.cpp.o
...
[3321/3322] Running the standalone regression tests
llvm-lit: .../git/llvm-project/llvm/utils/lit/lit/llvm/subst.py:126: note: Did not find mlir-opt in .../git/mlir-examples-standalone/build/tools/standalone-dialect/bin:.../git/mlir-examples-standalone/build/./bin
...
ninja: build stopped: subcommand failed.
me@myMac build %
```
This is macOS 14.7, ARM64.
(The `llvm-project` is somewhat newer than when I copied the `standalone` examples, but both are from today.)
</pre>
<img width="1px" height="1px" alt="" src="http://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