[libc-commits] [libc] [llvm] [libc][cmake][linux] require new LLVM_LIBC_USE_HOST_KERNEL_HEADERS or LIBC_KERNEL_HEADERS (PR #123820)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Wed Jan 29 11:36:08 PST 2025


================
@@ -183,7 +191,9 @@ Linux headers in your sysroot.  Let's build them from source.
    $> make LLVM=1 INSTALL_HDR_PATH=/path/to/sysroot -C /tmp/linux headers_install
 
 The headers can be built to target non-host architectures by adding the
-``ARCH={arm|arm64|i386}`` to the above invocation of ``make``.
+``ARCH={arm|arm64|i386}`` to the above invocation of ``make``. Then you should
+set the cmake variable `-DLIBC_KERNEL_HEADERS=/path/to/sysroot` when
----------------
nickdesaulniers wrote:

Ah, you're right about the inconsistency. I think I will resolve it the other way, since existing docs talk about setting
```
$> SYSROOT=/path/to/sysroot # Remember to set this!
```
above. So I will use `/path/to/sysroot/` more consistently and get rid of `/path/to/kernel/headers`.

Done in db5b2f90127b.

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


More information about the libc-commits mailing list