[llvm] [BOLT][ICP] Use PC-relative instructions for x86 PIC binaries in ICP (PR #216587)

Pengcheng Wang via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 1 01:23:08 PDT 2026


================
@@ -34,6 +34,7 @@ extern cl::OptionCategory BoltOptCategory;
 extern cl::opt<IndirectCallPromotionType> ICP;
 extern cl::opt<unsigned> Verbosity;
 extern cl::opt<unsigned> ExecutionCountThreshold;
+extern cl::opt<bool> X86ICPPIC;
----------------
wangpc-pp wrote:

This introduces a link-time dependency from LLVMBOLTPasses on opts::X86ICPPIC, whose definition lives in LLVMBOLTTargetX86. A valid BOLT build with X86 excluded from BOLT_TARGETS_TO_BUILD will therefore have an unresolved symbol, regardless of the runtime BC.isX86() check.

https://github.com/llvm/llvm-project/pull/216587


More information about the llvm-commits mailing list