https://github.com/shiltian commented: I think the proposed approach is really hacky. Maybe we should try not to eliminate functions that are not used yet at the builtin link time, or just use a different approach to link them. https://github.com/llvm/llvm-project/pull/181774