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

    <tr>
        <th>Summary</th>
        <td>
            [flang] build regression: builds in Azure Pipelines run out of memory despite 16GB swapfile
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            flang
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          h-vetinari
      </td>
    </tr>
</table>

<pre>
    While trying to test #110217, both to provide feedback and to test its integration into our distribution (as well as meson), I've built LLVM from main (concretely 87bfa58a5a4b85416d2486797d0f21fc67da5cf3). Due to the constraints of building on public CI (as well as for other concerns), we're building and packaging LLVM in various stages (compare [here](https://github.com/conda-forge/clang-compiler-activation-feedstock/pull/150)).

The main issue I wanted to raise is that I haven't managed to build flang 20 (and only flang; i.e. with clang, llvm, mlir etc. already pre-built) in azure pipeline's free CI; it runs out of memory on an agent with 7-8GB main memory _plus_ a 16GB swapfile. I can try switching from `-j2` (implicitly) to `-j1`, but then I'm afraid the build will run into timeouts, as we're already pushing the hard 6h timout. While flang has always been a handful to build, I consider this a regression in the broader sense since v19. CC @banach-space @sscalpone 

This is perhaps another case where relanding https://github.com/llvm/llvm-project/pull/95672 would be beneficial (compare also discussion in #112789).
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVE2P4zYM_TXKhUhgK_5IDjnMB2YRYAv0ULTHBS3RtnZlyRClBOmvLyRPZ7o9FOjJ1gepx8f3iMxmckQX0T6L9nWHKc4-XOb9jaJxGMxu8Ppx-WM2liCGh3ETRA-ROIKQx7quZN0L-QKDj3M-WYO_GU0wEukB1Q9Apz8iTGQwLtIUMBrv8r8HnwJowzGYIZVdIU_IcCdrARkWYu-EPOdHrkL2N4IhGRvh69fff4Ex-AUWNCVKeacCRbIPOPXDiO0JW2yGU9vUnZbNqevPva5GWY-q6zW2ajwKeT7Aa6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