diff mbox series

[06/11] clang: Disable clangd's decision-forest completion model on powerpc

Message ID 20260830125853.1139807-7-sunilkumar.dora@windriver.com
State New
Headers show
Series clang/llvm: Upgrade to 23.1.0 | expand

Commit Message

Dora, Sunil Kumar Aug. 30, 2026, 12:58 p.m. UTC
From: Sunil Dora <sunilkumar.dora@windriver.com>

The generated CompletionModel.cpp overflows 16-bit branch displacements
on ppc32 and the assembler rejects it with thousands of

  {standard input}:177591: Error: operand out of range (0x81f8 is not
  between 0xffffffffffff8000 and 0x7fff)

Build clangd with -DCLANGD_DECISION_FOREST=OFF on powerpc, which falls
back to the heuristic completion ranking.

Signed-off-by: Sunil Dora <sunilkumar.dora@windriver.com>
---
 meta/recipes-devtools/clang/clang_git.bb | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/meta/recipes-devtools/clang/clang_git.bb b/meta/recipes-devtools/clang/clang_git.bb
index a8c5e8cb2d..c54a49b618 100644
--- a/meta/recipes-devtools/clang/clang_git.bb
+++ b/meta/recipes-devtools/clang/clang_git.bb
@@ -75,6 +75,10 @@  EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \
                   -DCMAKE_STRIP=${STAGING_BINDIR_NATIVE}/llvm-strip \
 "
 
+# The generated completion model overflows ppc32's 16-bit branch range
+# ("operand out of range" from gas); use the heuristic ranking instead.
+EXTRA_OECMAKE:append:powerpc = " -DCLANGD_DECISION_FOREST=OFF"
+
 CLANG_ENABLE_TESTSUITE ??= "0"
 CLANG_TESTSUITE_FLAGS = "\
                   -DCLANG_INCLUDE_TESTS=ON \