You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NDK r27+ ships Clang 18+, which introduces a CRTP (Curiously Recurring Template Pattern) name-lookup regression in V8's turboshaft AssemblerOpInterface<Next> : public Next.
Error signature
../deps/v8/src/compiler/turboshaft/assembler.h:1549:24: error: member initializer 'matcher_' does not name a non-static data member or base class
../deps/v8/src/compiler/turboshaft/assembler.h:1551:52: error: use of undeclared identifier 'matcher_'
../deps/v8/src/compiler/turboshaft/assembler.h:1557:12: error: use of undeclared identifier 'ReduceIfReachableTypeHint'
...
fatal error: too many errors emitted, stopping now [-ferror-limit=]
Root cause
Clang 18+ requires this-> qualification for dependent names in templated base classes (CRTP). V8's AssemblerOpInterface<Next> : public Next uses unqualified names like matcher_, ReduceIfReachable*, resolve() in macros and constructor initializer lists. These worked with Clang 17 but fail with Clang 18+.
The affected code is in deps/v8/src/compiler/turboshaft/assembler.h — the DECL_MULTI_REP_BINOP_V, DECL_MULTI_REP_BINOP, and related macros, plus the constructor initializer list at line ~1549.
Current workaround
Use NDK r26d (Clang 17) — the last NDK release without this regression.
Problem
NDK r27+ ships Clang 18+, which introduces a CRTP (Curiously Recurring Template Pattern) name-lookup regression in V8's turboshaft
AssemblerOpInterface<Next> : public Next.Error signature
Root cause
Clang 18+ requires
this->qualification for dependent names in templated base classes (CRTP). V8'sAssemblerOpInterface<Next> : public Nextuses unqualified names likematcher_,ReduceIfReachable*,resolve()in macros and constructor initializer lists. These worked with Clang 17 but fail with Clang 18+.The affected code is in
deps/v8/src/compiler/turboshaft/assembler.h— theDECL_MULTI_REP_BINOP_V,DECL_MULTI_REP_BINOP, and related macros, plus the constructor initializer list at line ~1549.Current workaround
Use NDK r26d (Clang 17) — the last NDK release without this regression.
mainbranch (v26.x): pinned tor26dbuild_ndkr27branch (v24.x LTS): usesr27d(v24.x's V8 turboshaft is unaffected)What needs to be done
this->to all dependent names inAssemblerOpInterface. This is a V8-side change tracked at build: update android-patches/trap-handler.h.patch nodejs/node#60369.this->only where needed) is feasible and stable enough to carry until the upstream fix lands.Related