aprantl added a comment. Meanwhile, have you looked into what it would take to make the BTF part of AsmPrinter link only if the BTF target is being built? Repository: rL LLVM https://reviews.llvm.org/D53736