Issue 160530
Summary Cannot build native clang-tidy-confusable-chars-gen when cross-compiling standalone clang
Labels clang, clang-tidy
Assignees
Reporter rossburton
    In the situation where you're cross-compiling clang standalone (that is, from inside clang/ against an existing llvm) the build doesn't know that it needs to build `clang-tidy-confusable-chars-gen` _natively_ and instead builds it for the target and then fails when it tried to run the target binary.

I chased that down to `LLVM_USE_HOST_TOOLS` not actually being set outside of the top-level `llvm/CMakeLists.txt`, so a standalone clang build doesn't actually have that set.

If I then manually set that, it fails to find `get_native_tool_path`, which is easily solved by adding `include(CrossCompile)` to the standalone case in `clang/CMakeLists.txt`.

But now it's failing with:

```
ninja: error: 'tools/extra/clang-tidy/misc/CONFIGURE_Clang_NATIVE', needed by '/bin/clang-tidy-confusable-chars-gen', missing and no known rule to make it
```

This I can't seem to figure out.  A top-level cross-compile of clang certainly does do the right thing though, so this _should_ be possible to make work.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to