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

    <tr>
        <th>Summary</th>
        <td>
            [mlir][cmake] - failing to build mlir target on x86 
        </td>
    </tr>

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

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

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

<pre>
    Hey,
I'm trying to build mlir on Ubunto 18.04 with clang/15.0.2 using this command :
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

however, I'm getting this error:
```
FAILED: tools/mlir/lib/Dialect/SparseTensor/IR/CMakeFiles/obj.MLIRSparseTensorDialect.dir/Detail/DimLvlMap.cpp.o 
/usr/mobileye/pkgs/llvm/15.0.2/bin/clang++ -DBUILD_EXAMPLES -DGTEST_HAS_RTTI=0 -DMLIR_CUDA_CONVERSIONS_ENABLED=0 -DMLIR_ROCM_CONVERSIONS_ENABLED=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D_LIBCPP_ENABLE_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/localdrive/users/amirb/LLVM/llvm-project/build/tools/mlir/lib/Dialect/SparseTensor/IR -I/localdrive/users/amirb/LLVM/llvm-project/mlir/lib/Dialect/SparseTensor/IR -I/localdrive/users/amirb/LLVM/llvm-project/build/include -I/localdrive/users/amirb/LLVM/llvm-project/llvm/include -I/localdrive/users/amirb/LLVM/llvm-project/mlir/include -I/localdrive/users/amirb/LLVM/llvm-project/build/tools/mlir/include -gmlt -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Werror=mismatched-tags -Werror=global-constructors -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT tools/mlir/lib/Dialect/SparseTensor/IR/CMakeFiles/obj.MLIRSparseTensorDialect.dir/Detail/DimLvlMap.cpp.o -MF tools/mlir/lib/Dialect/SparseTensor/IR/CMakeFiles/obj.MLIRSparseTensorDialect.dir/Detail/DimLvlMap.cpp.o.d -o tools/mlir/lib/Dialect/SparseTensor/IR/CMakeFiles/obj.MLIRSparseTensorDialect.dir/Detail/DimLvlMap.cpp.o -c /localdrive/users/amirb/LLVM/llvm-project/mlir/lib/Dialect/SparseTensor/IR/Detail/DimLvlMap.cpp
In file included from /localdrive/users/amirb/LLVM/llvm-project/mlir/lib/Dialect/SparseTensor/IR/Detail/DimLvlMap.cpp:9:
In file included from /localdrive/users/amirb/LLVM/llvm-project/mlir/lib/Dialect/SparseTensor/IR/Detail/DimLvlMap.h:17:
/localdrive/users/amirb/LLVM/llvm-project/mlir/lib/Dialect/SparseTensor/IR/Detail/Var.h:389:1: error: static assertion failed due to requirement 'IsZeroCostAbstraction<mlir::sparse_tensor::ir_detail::VarInfo>'
static_assert(IsZeroCostAbstraction<VarInfo>);
```

I've tried to build without this commti : https://github.com/llvm/llvm-project/commit/6b88c852b649a4eb3e0eb01efea88f5bac360f1a
and everything works fine. is it something with my clang version? or is it related to this specefic commit?

would be glad for your response, thanks in advance
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMV1uP6jgS_jXuF8sIHC7pBx4CIT3schPQl90X5MSV4GnHztgOfdhfv3KS07Bz5qw0M5o9K7Xo2HX76ivHqWLWikIBTNFohkbxA6vdWZspK4WZCXt-SDW_Tn-CK6Jz1I9RP1oiOimxM1ehCuw0TmshOS6lMFgr_JzWymk8CHv9If4Q7owzyVSBaDIY9fo9imvb2J2FxZkuS6Y4RkHUus5K9g6YPOGNUD8z3Oshmkh5KTGJV6uX9WmxiWarxWm33_5tMT8eUBA3YTH-qjB7Xq7i0-ItWu9WCy_fbr6KjtH-aXE8nI7bVgsFMaL0LRyjYLZ52R3fUDCL1vHT7hlR2rqcr6O_Lzqfx3_sFiiI9yCBWfgVoOhwWOyPy-2mC3lnPT_Nt-vdcrXYoyBuqLiJ3t6-ESI6Q3R2l1EXYdUA3m5antrfs_6ACxhE57itSQHOfZILxmjzySwa97u_ZplEy9UiRkGEndbSIpp4Ij3bIkU0iQWTkDlEk0PFjIUjKKu9eLlHNJmv2TskQoK30-nPvfVqub9X7Mx7vHEZg2NCNl7L1UWuWdXLqqqncYeMJrX1eqVOhYQrIJpU74XtSv95cBBNUqEQTe55IvF_VhyT-Om4OBxPP0WH0_54XKIg7mMSe4Sn-XMcnebbzctif_C16riN73X22_n6v-ic4sXs-ck_PK2WM1_AW-mb3c3z6bB93s8XfuVVdrtvD4mXnQ7H2J-NzeEYbY6ndTTfb-8EyXa_jr7dXi3Xy9vu0nOkMya5ERdoiATjifMvr6-jP0Edj6Qy-ue2ps0Li2jye0v_hwP-5QG-ZiRUJmsOf9hPd-D-rJsu3z_r5jt1-nRblNJhku-Wc0xypYmFkiknMiKUA1NpK5zQCpP8IqxIhRTuSoSSQoElZ8E5KExeu2si5swBcaKEu71aFTUzHDhhFyYk63wo-MDklUnpVb84wzB5VZrUqrbAScUMK8GBweT1wwgHxDojVGExec2YdeSXmnnLUlj_JSC5AMmJUMIJJsW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