V8 build error with 22.7.0
未关闭
还没有人认领这个 Issue。
build
confirmed-bug
v8 engine
- 主要语言
- JavaScript
- 星标
- 122k
- 派生
- 37.3k
- 平均合并
- 4 天 2 小时
- 30 天内合并 PR
- 283
描述
Like https://github.com/nodejs/node/issues/53633 which was for gcc 12 and fixed in commit f4a7ac5e1842c0f4629a0bebfda38f2502a2ee41 but with clang 15.0.7 on x86_64 linux I get the exact same build error:
../deps/v8/src/base/small-vector.h:25:3: error: static assertion failed due to requirement '::v8::base::is_trivially_copyable<std::pair<const v8::internal::com
piler::turboshaft::PhiOp *, const v8::internal::compiler::turboshaft::OpIndex>>::value': T should be trivially copyable
ASSERT_TRIVIALLY_COPYABLE(T);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../deps/v8/src/base/macros.h:211:3: note: expanded from macro 'ASSERT_TRIVIALLY_COPYABLE'
static_assert(::v8::base::is_trivially_copyable<T>::value, \
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../deps/v8/src/compiler/turboshaft/loop-unrolling-reducer.h:431:65: note: in instantiation of template class 'v8::base::SmallVector<std::pair<const v8::interna
l::compiler::turboshaft::PhiOp *, const v8::internal::compiler::turboshaft::OpIndex>, 16>' requested here
base::SmallVector<std::pair<const PhiOp*, const OpIndex>, 16> phis;
Maybe just remove that ASSERT_TRIVIALLY_COPYABLE? Upstream already tests for correctness and to us it's just a recurring source of build breakage.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先将 deps/v8/src/base/small-vector.h 和 deps/v8/src/compiler/turboshaft/loop-unrolling-reducer.h 中的失败与相关 issue 53633 和 commit f4a7ac5e1842c0f4629a0bebfda38f2502a2ee41 进行比较。检查 deps/v8/src/base/macros.h 中的 assertion,并复现 clang 15.0.7 x86_64 Linux build。在不削弱正确性检查的情况下使 build 成功即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- cpp, linux
- 领域
- build-system, compilers, operating-systems
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100