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

    <tr>
        <th>Summary</th>
        <td>
            On macOS, i386/x86_64 universal build fails due to BLAKE3
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          MarcusCalhoun-Lopez
      </td>
    </tr>
</table>

<pre>
    On x86_64 systems, [assembly files are included in the build](https://github.com/llvm/llvm-project/blob/bb1b0e61cda66cb9f06bc4f1dc21e03bb1744d22/llvm/lib/Support/BLAKE3/CMakeLists.txt#L56).
 
On i386  systems, the symbols from assembly files are not included due to the use of `#if defined(__x86_64__)`, but there is no problem because the [symbols are never used](https://github.com/llvm/llvm-project/blob/bb1b0e61cda66cb9f06bc4f1dc21e03bb1744d22/llvm/lib/Support/BLAKE3/CMakeLists.txt#L73) due to `disable_blake3_x86_simd`.

On macOS i386/x86_64 universal builds, the symbols from the assembly files are assumed to exist (since `disable_blake3_x86_simd` is [not called](https://github.com/llvm/llvm-project/blob/bb1b0e61cda66cb9f06bc4f1dc21e03bb1744d22/llvm/lib/Support/BLAKE3/CMakeLists.txt#L57)), but they do not exist on the i386 slice because the assembly files are include guarded.

This logic causes an undefined symbols link error because the symbols are not defined on the i386 slice.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMlM1u-zYQxJ-GuhB_gyIl2jroEDv1pQ5ySO8GP1Y2G0o0uGQQ9-kLyrEbo2mA3gIIICBhl7Mzv5VCdIcJoCftmrSPlcrpGGL_pKLJuFH-GPL0axdO8Felgz33zxN9X8m9bCieMcGIhG8oadcKEUbtz3RwHpCqCNRNxmcLlrqJpiNQnZ23pH0kfHVM6YREPBC-JXx7cOmY9cKEkfCt92_X49cphj_BJMK32gddDl1rBrI2VklpdDcwqU0z1NbwGpjQul42jeX8Ux9X6l7y6RRiabTePfz-myB8u3lSr7BzmHCR3hPhYtdKwrsFYY-EPdDL8TxRJ1aSfh62jILnUQePdIhhpF-MPoX0z_g2A01hrssINAyUSEa4cAO1MLgJLOGr_f5i635PeDd_31CdU6kqViKdAj3FoD2MVINRpVPpSNr1Vcx8MbxBLNf8ZKOXgvDuaguRzDpU2sNee_UKYjYC3WiJZB9p3MIYlXl-mSMhfPvBYZ7cG0RU_gLY1xmVF1_kpBDzCLbogHeHiRK-QjcZ-F5WyYO065KyUd7_aLPbZQGqPDegztSGGdHLzOGynjPo6J2BO8D-e7HpIatowd6F9MfRIfXh4AydeyBVE83TB-i3ULybXinEGOLdZXcoh3Tdj39LXFS2F7YTnaqgr-VStHxZc1kde6u0FgqUVGJY8VbWehg60zKmTaOsYJXrOeOC1TWvuVg1cqGVqpfWGtstGbNWkYbBqJxfFLMXIR4qh5ihb7tOtpVXGjxef5exnyPV-YCkYX42_laWXPLQX7EtAXxLLh2U83jdi0ukVY6-_99czXqR8O0s-e8AAAD__3NG6RU">