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

    <tr>
        <th>Summary</th>
        <td>
            Can't reopen pull/86737 / work out why arm bot fails building sanitizer if builtins is fixed
        </td>
    </tr>

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

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

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

<pre>
    Changing compiler-rt builtins to succeed without a libc (https://github.com/llvm/llvm-project/pull/86737) breaks the arm bot (https://lab.llvm.org/buildbot/#/builders/178/builds/7117) while trying to build sanitizers, 

```
/home/tcwg-buildbot/worker/clang-armv8-lld-2stage/stage1/./bin/clang++ --target=armv8l-unknown-linux-gnueabihf -DHAVE_RPC_XDR_H=1 -D_DEBUG -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_ASSERTIONS -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/tcwg-buildbot/worker/clang-armv8-lld-2stage/llvm/compiler-rt/lib/sanitizer_common/.. -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 -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 -Wall -Wno-unused-parameter -O3 -DNDEBUG -march=armv7-a -mfloat-abi=soft -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -ftrivial-auto-var-init=pattern -nostdinc++ -Wno-format -fno-rtti -Wframe-larger-than=570 -Wglobal-constructors -std=c++17 -MD -MT compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.arm.dir/sanitizer_deadlock_detector2.cpp.o -MF compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.arm.dir/sanitizer_deadlock_detector2.cpp.o.d -o compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.arm.dir/sanitizer_deadlock_detector2.cpp.o -c /home/tcwg-buildbot/worker/clang-armv8-lld-2stage/llvm/compiler-rt/lib/sanitizer_common/sanitizer_deadlock_detector2.cpp
In file included from /home/tcwg-buildbot/worker/clang-armv8-lld-2stage/llvm/compiler-rt/lib/sanitizer_common/sanitizer_deadlock_detector2.cpp:13:
In file included from /home/tcwg-buildbot/worker/clang-armv8-lld-2stage/llvm/compiler-rt/lib/sanitizer_common/sanitizer_deadlock_detector_interface.h:22:
In file included from /home/tcwg-buildbot/worker/clang-armv8-lld-2stage/llvm/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h:15:
In file included from /home/tcwg-buildbot/worker/clang-armv8-lld-2stage/llvm/compiler-rt/lib/sanitizer_common/sanitizer_platform.h:25:
In file included from /usr/include/features.h:485:
/usr/include/arm-linux-gnueabihf/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-soft.h' file not found
    7 | # include <gnu/stubs-soft.h>
      | ^~~~~~~~~~~~~~~~~~
```

Various other files fail similarly. My best guess is the bot doesn't have a sysroot set up at this point, which causes the compiler-rt builtins build to fail, and somehow that's considered a success and a reason to skip over building the sanitizers, which is presumably fine since the bot goes green and the sanitizers wouldn't have a gnu/stubs-soft.h header as a result of tolerating a missing libc.

This makes very little sense to me so I assume the error lies in cmake somewhere, unfortunately I can't find the invocation driving the failing CI build.

Creating this issue because I can't reopen a PR (?) and otherwise I'm likely to forget about it. @luporl I'm hoping you have some more information on this.


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMWF9v47gR_zTMy4CGLTlx8uAHx47vXGw2hyR32TdjJI4kNhTpkkN73Yd-9oKUs0l2A_SKAr0NAlsazZ_f_DgiZ4wh6NYSzcX5tThfnWHkzvn535xddhSYfKPJqLPKqeN82aFttW2hdv1OG_LSM1RRG9Y2ADsIsa6JFBw0dy4yIBhd1SCKy455F0S5EMVaFOtWcxerUe16UayN2b98yZ13f6eaRbHeRWNEsb68mJUzUVxB5QmfA3BHgL6HyvGPbg1Wo-Rm5HwrinVCpirH-WH5IiAfRLGezC5fBOl2NpnkKIdOGwL2x5Qlu5ycgoBWs_5ntlyCGK_EeHH6vBif_ofbYt25nkSx5vrQyjcADs4_kxfFujZoW4m-319KY5QsAmObLPL3RBTrUQKm7YuuKK5FcQ1SMvqWWJSrbGxktM_WHaw02savsrWRsNJdA3L16-KPm-39b8vtl9X99ldRriYgV9vVzfXvv6SL9ebTzfZuvX64edxebx4fRLm6mKYHv3zaXC-_fNkuHh5u7h83d58fkvTT4v6Xm2zzcPf7_fImybYPj6vldnn3-eFx8flxe7tY3t89vD5Y393fLn4Uf9rcbl6lm_-FrVPRvCnEJNRVIvJltba163uXiByNQDa_bZYgG-tkoB4t61pqy-R3LmjWzoJs9jroShvNR6mt0ZaC7LRSZEE-kffOi3KlkEmy7umNLNo2olekJO5RGzz5sHQA-YTGJNWv7BHkk3Uy2hhIyR167InJg3w6eM0kA3tt2wDyqcbA8h8Rk2WvQ9C2lfk9lDrlhiYXI8gn3e-MrjXLBo3hzrvYdsne7cmTkuGgue6kogaj4SG8dfS1ph1LPu4oi6zca88RjVTsEhxFhpjkB09CbFsKLJN_r1WyH1DL2tk9-ZCJTJgNoUpybRVZxoHhp5pRyR6PFcloQ9ztnGdSIBulsbUusK6DrJ1JwZom2jrZyUD5OyQ9ZHxzf2L3Q1bvSpCrz6eq79HX3endmUkE2TfGIUustChXwTX8tkJOe9pwM9B1iu_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