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

    <tr>
        <th>Summary</th>
        <td>
            [libc++] LIBCXX_ASSERTION_HANDLER_FILE needs to be relative from libcxx/include, which is strange
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            libc++,
            hardening
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
            var-const
      </td>
    </tr>

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

<pre>
    When we added `LIBCXX_ASSERTION_HANDLER_FILE`, we did not specify whether it was a relative or an absolute path, and if relative, we did not specify relative to what it would be evaluated. That makes it extremely challenging to specify the path in a CMake cache file.

>From a cache file, variables like `CMAKE_SOURCE_DIR` expand to `runtimes/` since that's where the "top-level" CMakeLists.txt is located. So using an absolute path has to look awkward like `${CMAKE_SOURCE_DIR}/../libcxx/vendor/foo/some_assertion_handler.in`.

Using a relative path is weird too: the path seems to be evaluated relative to `libcxx/include` since that's where the `LIBCXX_ASSERTION_HANDLER_FILE` is used in `configure_file`, and that is confusing too.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyElEFv2zgQhX8NdRlEoGlHWh10cGwLG2zaAkmL7c0YkSOJa4o0SMp2_v2CcuOmW2wLGNaBg6fH780ThqB7S1Sz-wcmxAn9nXQ2RCYEu99mOMXB-doo7aylrHXqtf57IAtnAlSKFLCCPz0-bL5-3a9fXnbPnx8_fdz_uf64fdo975vHpx0rOBObNK-0AusihCNJ3b3CeaA4kAcd4YwBEDwZjPpE4DygBWyDM1MkOGIckgZaBbq7jf2P7E0lOjgPGGd9NxkFLQGd0EwYSeXwOZ2NeKCQJugSPY1kXkEOaAzZXts-SbzJxuFqBLQFhM0HPBBIlANBpw3ljG8ZX1__G-9GwHenyekJvcbWUACjD5SwbT6s_9rtXz59ed7s9tvHZ1ZwoMsx3TK6NOAnG_VIgYkmnQVtJUEcMDJRhoTP02yLCRHd8c7QiQwT4mruSYcY8niJoAMYJ6-XfnEwhXSz__KFAUN6rXHuAHg-nNGrm1MmVqx8-MlvuWWiyXMmGqNbebkw0ZzIKueZaDrnmGiCG2mPIZCP2tn9gFYZ8rm2rOA_IPtyNfU9vCvqAGfSPvFwbLn-nkEgGme77yP9IXlW8JspbaWZFP2a4e_XONmZAqm0Aazg0tlO95On_Rzxdc3n8OalC5AGrrCjc3mm6qWqlhVmVC9KXi5WJeerbKg5Liq17HhXVGpRUFWVoqtWC6xQYidbkelacLHigt8v7pecL3MsVcdVKSXJRdUtVmzFaURtcmNOY-58n-kQJqr_4EVVZAZbMuFbvxMTJh7mn2Biw4QY0Cuy2vbfKu_rJHPXTn1gK27mNboJRx3N_K14J3S_hV-iA0uk3tK6ZdSlkvwUUar0oOUcfYgebU_Z5E09xHgMbLlOVRBNr-Mwtbl0Y9o9c3p73B29-4dkTIKJQGrODOHfAAAA___0L5uA">