[libc-commits] [llvm] [libc] [libc] Fix libc-hdrgen crosscompiling (PR #78227)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Mon Jan 15 19:41:27 PST 2024


jhuber6 wrote:

Fails with this locally.
```
[0/5] Building native libc-hdrgen...
ninja: error: unknown target 'libc-hdrgen'
FAILED: NATIVE/bin/libc-hdrgen /home/jhuber/Documents/llvm/llvm-project/build/NATIVE/bin/libc-hdrgen 
cd /home/jhuber/Documents/llvm/llvm-project/build/NATIVE && /usr/bin/cmake --build /home/jhuber/Documents/llvm/llvm-project/build/NATIVE --target libc-hdrgen --config Release
ninja: build stopped: subcommand failed.
```

My CMake is pretty close to the following, you could probably remove a lot of stuff.
```
cmake ../llvm -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;compiler-rt;lld" -DLLVM_ENABLE_RUNTIMES="openmp;libc;libunwind" -DLLVM_ENABLE_ASSERTIONS=ON -DLIBOMPTARGET_ENABLE_DEBUG=ON -DLIBOMPTARGET_DEVICE_ARCHITECTURES="gfx1030;sm_60;sm_89" -DLLVM_USE_LINKER=lld -DCLANG_DEFAULT_LINKER=lld -DLIBC_GPU_ARCHITECTURES="sm_89;gfx1030" -DLIBC_GPU_TEST_JOBS=1 -DLLVM_OPTIMIZED_TABLEGEN=ON -DBUILD_SHARED_LIBS=ON -DLLVM_CCACHE_BUILD=ON -DLLVM_APPEND_VC_REV=OFF -G Ninja && ninja
```

https://github.com/llvm/llvm-project/pull/78227


More information about the libc-commits mailing list