opt currently attempts to load target information for the target triple specified in the bitcode. If the triple does not match a known target, it silently uses unknown target information. This can cause subtle changes in compiler behavior that are difficult to track down.
A better approach would be for opt to enforce that a backend exists for the specified triple.
Like llc, -mtriple could be used to override the target triple, providing a way to bypass the error.
For example, prior to r172534, the behavior of this test changed dependning on whether the host compiler had built the X86 backend. The test failed with a native ARM-only compiler:
Fixing this behavior requires cleaning up the test cases, see #15397 .
The text was updated successfully, but these errors were encountered: