This is useful when cross-compiling libc to another target in which
case we first need to compile libc-hdrgen for host. We rely on the
existing LLVM CMake infrastructure for that.
Details
Details
- Reviewers
sivachandra - Commits
- rG1daaa6432e84: [CMake][libc] Support cross-compiling libc-hdrgen
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Note that there's one additional issue right now. The TableGen cross-compilation sub-invokes CMake which fails with:
CMake Error at /src/clang-llvm/llvm-project/libc/CMakeLists.txt:49 (message): 'clang' and 'clang-tools-extra' are required in LLVM_ENABLE_PROJECTS to lint llvm-libc. The linting step performs important checks to help prevent the introduction of subtle bugs, but it may increase build times. To disable linting set LLVM_LIBC_ENABLE_LINTING to OFF (pass -DLLVM_LIBC_ENABLE_LINTING=OFF to cmake). -- Configuring incomplete, errors occurred!
I think we'll need some way detect when we're cross-compiling TableGen and disable the linting support in that case.
Comment Actions
We can take simpler route of not enabling linting by default. Developer workflow will involve testing with linting enabled of course.
Comment Actions
I'm fine with that, it'd also simplify integrating libc into the runtimes build where I'm also hitting this issue.