LLVM Error: 'Unknown target triple' – TargetInfo component
0 reputation · 22 Apr 2023, 15:27 UTC
Goal: Configure meaningful diagnostics
We want to keep only critical errors while suppressing routine warnings, using LLVM’s DiagnosticHandler API.
Constraints: The handler must not swallow fatal errors such as the documented “LLVM Error: 'Unknown target triple'” emitted by TargetInfo when an invalid triple is passed to TargetMachine::createTargetMachine.
Unresolved behavior: When PassManagerBase::run encounters a fatal error during a pass, the public documentation does not specify whether the entire pipeline should abort or continue with a partial result for all pass manager variants.
- Is there a documented policy that dictates whether PassManagerBase aborts the pipeline or continues after a fatal error?
- How can a custom DiagnosticHandler be configured to guarantee that such fatal errors are always reported, even when other diagnostics are suppressed?
- Are there any TargetOptions or PassManager settings that influence this abort/continue decision?