Open petrhosek opened 5 years ago
Seems like there are two issues going on here.
Unlike the legacy pass manager, the new pass manager always makes the target machine available to passes so we have to always instantiate it even when we're only emitting bitcode, see https://github.com/llvm/llvm-project/blob/master/clang/lib/CodeGen/BackendUtil.cpp#L952. This breaks when some targets tested by Clang don't match targets built by LLVM.
Some Clang tests match the bitcode that's being emitted, but the emitted sometimes differs between the legacy and new pass manager.
I used -DENABLE_EXPERIMENTAL_NEW_PASS_MANAGER=ON CMake option to enable the new pass manager by default which should be equivalent to always passing -fexperimental-new-pass-manager.
Extended Description
Most of these errors seem to be the instance of:
No available targets are compatible with triple 'foo'
I've attached a complete output from llvm-lit.