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

    <tr>
        <th>Summary</th>
        <td>
            Compiler-RT fails to compile
        </td>
    </tr>

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

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

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

<pre>
    Version: Git main as of yesterday

I'm developing a feature for Clang, and my version of Clang is crashing, no big deal that's what debugging is for.

the problem is, Compiler-RT is trying to use the freshly created compiler that crashes to finish building llvm, so llvm doesn't fully compile.

there's a lot more errors, the point is, when the build reinvokes cmake and changes the compiler to `./bin/clang` it all falls apart.

cmake build command:

cmake -G Ninja -DLLVM_ENABLE_PROJECTS="clang" -DCMAKE_INSTALL_PREFIX="/Library/Developer" -DLLVM_TARGETS_TO_BUILD="X86" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLVM_CREATE_XCODE_TOOLCHAIN=ON -DLLVM_OPTIMIZED_TABLEGEN=ON -DCMAKE_OSX_DEPLOYMENT_TARGET=12.1 -DLLVM_USE_SANITIZER=Address -DLLVM_CODESIGNING_IDENTITY="lldb_codesign" -DINSTALL_RPATH="/Library/Developer/Toolchains" -DLLVM_LIBC_MPFR_INSTALL_PATH="/usr/local/Cellar/mpfr/4.1.0" /Users/Marcus/Source/External/LLVM/llvm

----

errors:

-- Build files have been written to: /Users/Marcus/Source/LLVM_NINJA/runtimes/builtins-bins
[119/826] Building C object CMakeFiles/clang_rt.cc_kext_i386_osx.dir/os_version_check.c.o
FAILED: CMakeFiles/clang_rt.cc_kext_i386_osx.dir/os_version_check.c.o 
/Users/Marcus/Source/LLVM_NINJA/./bin/clang --target=x86_64-apple-darwin20.6.0 -DKERNEL_USE -I/Users/Marcus/Source/External/LLVM/compiler-rt/lib/builtins/../../include -O2 -g -DNDEBUG -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk  -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk -mmacosx-version-min=10.5 -fPIC -O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -fomit-frame-pointer -arch i386 -mkernel -MD -MT CMakeFiles/clang_rt.cc_kext_i386_osx.dir/os_version_check.c.o -MF CMakeFiles/clang_rt.cc_kext_i386_osx.dir/os_version_check.c.o.d -o CMakeFiles/clang_rt.cc_kext_i386_osx.dir/os_version_check.c.o -c /Users/Marcus/Source/External/LLVM/compiler-rt/lib/builtins/os_version_check.c

----

[128/826] Building C object CMakeFiles/clang_rt.cc_kext_x86_64_osx.dir/fixdfdi.c.o
ninja: build stopped: subcommand failed.
FAILED: runtimes/builtins-stamps/builtins-build /Users/Marcus/Source/LLVM_NINJA/runtimes/builtins-stamps/builtins-build 
cd /Users/Marcus/Source/LLVM_NINJA/runtimes/builtins-bins && /usr/local/Cellar/cmake/3.23.0/bin/cmake --build .

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzFVl1zmzoQ_TX2i0YMBtuNH_yAAbu0_hqbpOl9YQQIo0YgjySS-N93BXbjpre9tzeduRnHyGh19mh1dlepyE_TOyoVE3XP9dCCaVQRViOikCjQiSpNZU5OPTvo2V73HfWcdxXK6SPl4sjqAyKooEQ3kqJCSORzUh96jo9InaPqhB47dAPXTiGmUCaJKllnVguUsgPgEY50STSgK_QEA3iVNocD65YAtHXNQpcUHaVIOa1g2gD5ojoyTiXexWaBliezVAvUKIqMeSGpKvkJvANdmqPsvKB123GiyiwoWM1UidKG8dxgcP5YGQ9KtEOUC6pq4KlR0XAD2AG95idpuxeCuICoCogPlVLIlmxLX7Ban8k_lbRuX7ZOkaSsfhQPQCeryANtY5mVED1DEKxeqAvUG9tWz5mnDCjNszb6YxvBQRLOUQFfQOFIpP6OXgfb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