Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Sorry, I stuffed up the diff in that patch - it shouldn't include the config.py changes. Will fix.
Rebase. I'll try landing this once the pre-merge checks complete, if there are no objections.
FYI: I'm off next week, so if this doesn't fix things, and the issue is an issue that needs resolving faster, I'd recommend reverting the original change.
I've applied this patch but for me clang still fails to build. I've build python-lit and clang in revision 1546c52d971292ed4145b6d41aaca0d02229ebff. And applied this patch on top.
[340/341] cd /builddir/build/BUILD/clang-13.0.0.src/x86_64-redhat-linux-gnu && /usr/bin/python3.9 /usr/bin/lit -sv --param USE_Z3_SOLVER=0 /builddir/build/BUILD/clang-13.0.0.src/x86_64-redhat-linux-gnu/tools/extra/test /builddir/build/BUILD/clang-13.0.0.src/x86_64-redhat-linux-gnu/tools/extra/clangd/test/../unittests /builddir/build/BUILD/clang-13.0.0.src/x86_64-redhat-linux-gnu/tools/extra/clangd/test /builddir/build/BUILD/clang-13.0.0.src/x86_64-redhat-linux-gnu/test lit: /usr/lib/python3.9/site-packages/lit/llvm/config.py:431: fatal: couldn't find 'clang' program, try setting CLANG in your environment FAILED: CMakeFiles/check-all
These are the clang files in my mock environment:
$ find / -name "clang" /builddir/build/BUILDROOT/clang-13.0.0~pre20210527.g1546c52d971292-2.fc35.x86_64/usr/lib64/cmake/clang /builddir/build/BUILDROOT/clang-13.0.0~pre20210527.g1546c52d971292-2.fc35.x86_64/usr/lib64/clang /builddir/build/BUILDROOT/clang-13.0.0~pre20210527.g1546c52d971292-2.fc35.x86_64/usr/lib/python3.9/site-packages/clang /builddir/build/BUILDROOT/clang-13.0.0~pre20210527.g1546c52d971292-2.fc35.x86_64/usr/bin/clang /builddir/build/BUILDROOT/clang-13.0.0~pre20210527.g1546c52d971292-2.fc35.x86_64/usr/include/clang /builddir/build/BUILDROOT/clang-13.0.0~pre20210527.g1546c52d971292-2.fc35.x86_64/usr/share/doc/clang /builddir/build/BUILDROOT/clang-13.0.0~pre20210527.g1546c52d971292-2.fc35.x86_64/usr/share/clang /builddir/build/BUILD/clang-13.0.0.src/test/Tooling/Inputs/mock-libcxx/bin/clang /builddir/build/BUILD/clang-13.0.0.src/test/Driver/Inputs/mips_mti_linux/lib/clang /builddir/build/BUILD/clang-13.0.0.src/include/clang /builddir/build/BUILD/clang-13.0.0.src/x86_64-redhat-linux-gnu/lib64/cmake/clang /builddir/build/BUILD/clang-13.0.0.src/x86_64-redhat-linux-gnu/lib64/clang /builddir/build/BUILD/clang-13.0.0.src/x86_64-redhat-linux-gnu/cmake/modules/CMakeFiles/Export/lib64/cmake/clang /builddir/build/BUILD/clang-13.0.0.src/x86_64-redhat-linux-gnu/bin/clang /builddir/build/BUILD/clang-13.0.0.src/x86_64-redhat-linux-gnu/include/clang /builddir/build/BUILD/clang-13.0.0.src/bindings/python/clang /builddir/build/BUILD/clang-tools-extra-13.0.0.src/test/clang-tidy/checkers/Inputs/Headers/clang /builddir/build/BUILD/clang-tools-extra-13.0.0.src/test/clang-tidy/infrastructure/Inputs/mock-libcxx/bin/clang
Ah, I see I missed that paths is reused in use_clang, before the call to use_llvm_tool. I'll fix that now.
Use the right set of paths in use_clang. This should fix the issue. If it doesn't I'll need someone who can reproduce to dig more into why it doesn't.
@kwk, could you try again please with the latest version of the patch? The code now looks at the same paths as are added to the PATH environment variable, so it should work.
Great, thanks for letting me know. I'm not going to be at a computer to be able to land this for the next week, so someone else can on my behalf if they wish. Otherwise it will be in a bit over a week's time before I do.