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

    <tr>
        <th>Summary</th>
        <td>
            [clang][CIR] clangCIRLoweringCommon target missing dependency on MLIRBuiltinAttributesIncGen
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

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

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

<pre>
    When building using parallel `make -j`, the `clangCIRLoweringCommon` target can be built before the `MLIRBuiltinAttributesIncGen`. 

```
In file included from /Users/m4c/Projects/graph_framework/LLVM/clang/lib/CIR/Lowering/CIRPasses.cpp:13:
In file included from /Users/m4c/Projects/graph_framework/LLVM/llvm/../mlir/include/mlir/IR/BuiltinOps.h:16:
In file included from /Users/m4c/Projects/graph_framework/LLVM/llvm/../mlir/include/mlir/Bytecode/BytecodeOpInterface.h:17:
In file included from /Users/m4c/Projects/graph_framework/LLVM/llvm/../mlir/include/mlir/Bytecode/BytecodeImplementation.h:18:
In file included from /Users/m4c/Projects/graph_framework/LLVM/llvm/../mlir/include/mlir/IR/Diagnostics.h:16:
/Users/m4c/Projects/graph_framework/LLVM/llvm/../mlir/include/mlir/IR/Location.h:138:10: fatal error: 'mlir/IR/BuiltinLocationAttributes.h.inc' file not found
  138 | #include "mlir/IR/BuiltinLocationAttributes.h.inc"
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
```
In file included from /Users/m4c/Projects/graph_framework/LLVM/clang/lib/CIR/Lowering/LoweringHelpers.cpp:13:
In file included from /Users/m4c/Projects/graph_framework/LLVM/clang/include/clang/CIR/LoweringHelpers.h:15:
In file included from /Users/m4c/Projects/graph_framework/LLVM/llvm/../mlir/include/mlir/IR/BuiltinAttributes.h:12:
In file included from /Users/m4c/Projects/graph_framework/LLVM/llvm/../mlir/include/mlir/IR/BuiltinAttributeInterfaces.h:12:
In file included from /Users/m4c/Projects/graph_framework/LLVM/llvm/../mlir/include/mlir/IR/AffineMap.h:18:
In file included from /Users/m4c/Projects/graph_framework/LLVM/llvm/../mlir/include/mlir/IR/Value.h:17:
In file included from /Users/m4c/Projects/graph_framework/LLVM/llvm/../mlir/include/mlir/IR/UseDefLists.h:16:
/Users/m4c/Projects/graph_framework/LLVM/llvm/../mlir/include/mlir/IR/Location.h:138:10: fatal error: 'mlir/IR/BuiltinLocationAttributes.h.inc' file not found
  138 | #include "mlir/IR/BuiltinLocationAttributes.h.inc"
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

Adding `MLIRBuiltinAttributesIncGen` to 
https://github.com/llvm/llvm-project/blob/fc9215428138c4d9238486c2bdbea192b6107b65/clang/lib/CIR/Lowering/CMakeLists.txt#L6
should fix this.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzsVk2P2zYQ_TX0hYhADa2vgw5au2oNeJFggaTHgqJGFrMUKZBUkr30txeU7WxSBG0CNHUOEQRbHnvG782THp7wXp0MYk2yO5LtN2IJo3W1VMJIZb3YdLZ_qn8f0dBuUbpX5kQXH19n4YTWqCnJ2SQekb54S3JGYEfDiLEotTCn3eHhaN-jU-a0s9NkDckZDcKdMFApDO1wnRtoh4N1eO29Px4e7mJdmSYEp7oloD8Y-SvGAQklrIlnzi4naw6GDkojVUbqpceeDs5OlED72qPzBNppKwm0r5x9izLEwsmJefxjcGLC99Y9EmiPxzf3BNoVOIFWq45Auzs8xK8uJM6FV8J79ImcZ8KblBPe_LcItH43EWiTJHZp5Qi0l6nPhRXWZUcvZ5-MEUp-Eyh3TwGlXSvXy5fzwQR0g5B4Rlb8KMgO06xxQhNEUNacwZW3U3CvxMlYH5T8XMLv-69HKz-hzyP_lBHe0EEEoSk6Z138SKD4wu127X5-NJMxUUYSKM4LNDbQwS6mJ6yhNOUlJcWOEuAXNJQAfNNcWAfFYx2U_fLnVx5_c4nbOMb18jfUM7rv6BtXHM-iXyufY7oCWdXPbm5fn-odEcGPg-iji90eWjMMyuC9mG_uWW-EXm5q6yuK1x73OByVDz-d839wTtY0_Rr__jWe0WBjQBtDmH2UBNq4eRXGpUuknZ63Hd9ezGd1CLSdttE-B1lBmm2hTHkpt30FvNyWuYSu71CkFXR5yoouz74iqd2LRzzfIOFDIMCPOWGNH-2iezqoDzSMyiebvuZ9xSuxwTotKshTlublZqwLliEUZZcPBR_Ytsq6ElImOl4w3g1ZuVE1sPhzSNMqzVmR8IojpEOZQZZDWgHZMpyE0klkmlh32ijvF6yBbzmkGy061H6N3gAXLhBTuKvX1XTLyZMt0yuDjyOCCnrN6-eObE-yu0g929MvR-5r3p6UX5N7jzOaHo18otbQf9Byszhdf7OMK8X4sF1YvqvhrwAAAP__Lu0Idw">