Stage2 clang: llvm-tblgen will not compile
dslm4515 opened this issue · comments
Under chroot, LLD and clang will not compile because llvm-tblgen
fails to compile:
[14/22] Building CXX object utils/TableGen/CMakeFiles/llvm-tblgen.dir/CodeGenHwModes.cpp.o
In file included from /sources/llvm-project-15.0.5.src/llvm/utils/TableGen/DAGISelMatcherOpt.cpp:14:
/sources/llvm-project-15.0.5.src/llvm/utils/TableGen/CodeGenDAGPatterns.h:1046:23: error: expected expression
return Operands[ON];
^
1 error generated.
Source for TableGen builds fine if built with the stage0 clang
Perhaps, stage1 should have been compiled from source that wasn't patched to use the dynamic loader at /llvmtools/lib
and the packages built for llvmtools will then need to have the executables patched with the dynamic loader at /llvmtools/lib
^ Tried it. Same exact errors.
Tried the GCC+libstdc++ built for llvmtools: Same error.
But yet, stage0 clang can be reconfigured to build stage2 for the final system.
If so, was there a reason for building stage1 clang?
For now, stage0 will build stage2 clang. This change is introduced with commit 550cf2c
I may end up moving stage0 clang from cgnutools to llvmtools:
- Build mussel to produce cross-gcc
- Use cross-gcc to build stage0 clang and install in llvmtools
- Use stage0 clang to build rest of llvmtools
- Enter chroot. Build final system clang with stage0 clang
If successful, this would reduce build time as clang [& friends] will be built only twice as stage0 and final system compiler... instead of 3 times.
Interestingly, stage0 clang runs both on the host [glibc] and under chroot [musl]