已合并
refactor: unify CXX11 ABI configuration #4540
yelongjian创建于 13 天前
refactor: unify CXX11 ABI configuration #4540
已合并
yelongjian创建于 13 天前
yelongjian成员
13 天前

Pull Request

描述

ABI参数设置收归cann-cmake

变更类型

请选择本次引入的变更类型:

关联的Issue

如何测试

描述测试此变更的步骤和前提条件:
1.NA

核对清单

其他信息

在此添加任何其他关于本次 PR 的说明。

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 yelongjian 的贡献)
Yyelongjian成员
13 天前 添加了label:enhancement
Yyelongjian成员
13 天前 创建了 pull request,commit b267d793
atomgit-bot
atomgit-bot
13 天前 评论:

变更摘要

该 PR 主要将 CXX11 ABI 参数设置收归统一的 cann-cmake 配置管理:移除 build.shUSE_CXX11_ABI 的默认值及无条件透传逻辑,改为仅在显式设置时生效;并将 autofuse_protos.cmake 中硬编码的 _GLIBCXX_USE_CXX11_ABI=0 改为引用统一变量 CANN_CXX11_ABI,同时删除 dflow/udf/cmake/device 下若干本地化的 protobuf/abseil/seccomp 构建配置,整体收敛到统一配置入口。

主要改动

  • build.sh 移除 ABI 默认值与条件化传参: 删除 USE_CXX11_ABI=0 的默认赋值;将大小写归一化逻辑包进 if [[ -n "$USE_CXX11_ABI" ]] 判断,仅在变量非空时才解析 on/off/1/0;CMake 参数改为 ${USE_CXX11_ABI:+-D USE_CXX11_ABI=${USE_CXX11_ABI}},未设置时不再向构建传入 USE_CXX11_ABI
  • autofuse_protos.cmake 使用统一 ABI 变量: 目标 ge_autofuse_metadef_graph_protos_obj_af 的编译宏由硬编码的 _GLIBCXX_USE_CXX11_ABI=0 改为 _GLIBCXX_USE_CXX11_ABI=${CANN_CXX11_ABI},随统一配置取值。
  • 删除本地 protobuf 适配补丁: 移除 dflow/udf/cmake/device/protobuf_25.1_change_version.patch(版本号改写、ArenaStringPtr/ExtensionSet 兼容、符号可见性调整等约 486 行)与 protobuf-hide_absl_symbols.patch(absl 静态库与命名空间定制约 78 行),相关适配不再由本仓库维护。
  • 删除 seccomp.cmake 下载配置: 移除 dflow/udf/cmake/device/seccomp.cmake(libseccomp 头文件路径探测与 ExternalProject 下载逻辑),该依赖配置随 ABI 参数一并收归 cann-cmake
likedislike
不准确?
atomgit-bot
atomgit-bot
13 天前 评论:

代码审查

✅ 未发现问题

likedislike
不准确?
CANN-robotCANN-robot成员
13 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
13 天前 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here.
You can get sig-info at here.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.


PR Approval Progress

Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
repo-cann/ge 张德鹏, yangyongqiang0606, kobemini (3/2) 张德鹏 (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

yelongjian, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
CANN-robot
CANN-robot成员
13 天前 评论:

CLA Signature Pass

yelongjian, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
CANN-robotCANN-robot成员
13 天前 将yangyongqiang0606,kobemini,ClarkXie,tangqunzhang,xchu42,hugo111,lining23666,fu-jun2,depeng1994,wqtshg_wt,peiyang,shengnan666,zhangfan_hanq,zhanj,zhujingjing,Mexyy,wangxiaotian995,stevenaw0,yuht9设为评审人
CANN-robotCANN-robot成员
13 天前 将yangyongqiang0606,kobemini,ClarkXie,tangqunzhang,xchu42,hugo111,lining23666,fu-jun2,depeng1994,wqtshg_wt,peiyang,shengnan666,zhangfan_hanq,zhanj,zhujingjing,Mexyy,wangxiaotian995,stevenaw0,yuht9设为审查人
yelongjian成员
13 天前 评论:

compile

likedislike
Yyelongjian成员
13 天前 update merge request[project id: 8824148, iid: 4540, commit_id: e45f3ec70b4feb166d0bc211291ce557872629be] virtual merging success
CANN-robotCANN-robot成员
13 天前 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
13 天前 评论:

流水线任务触发成功
任务链接 [bc9a594ca3594f46bc65c26d7d09a007][流水线指导]

任务名称状态日志下载链接
pre_comment ✅ SUCCESS >>>>>
Compile_X86_compiler ✅ SUCCESS >>>>> >>>>>
Compile_X86_executor ✅ SUCCESS >>>>> >>>>>
Compile_X86_dflow ✅ SUCCESS >>>>> >>>>>
UT_Test_dflow ✅ SUCCESS
UT_Test_ge_common ✅ SUCCESS
UT_Test_parser ✅ SUCCESS
UT_Test_python ✅ SUCCESS >>>>>
UT_Test_rt ✅ SUCCESS
UT_Test_acl ✅ SUCCESS
UT_Test_autofuse ✅ SUCCESS
UT_Test_executor ✅ SUCCESS
UT_Test_autofuse_ascendc_api ✅ SUCCESS
ST_Test_dflow ✅ SUCCESS
ST_Test_ge_common ✅ SUCCESS
ST_Test_parser ✅ SUCCESS
ST_Test_python ✅ SUCCESS >>>>>
ST_Test_rt ✅ SUCCESS
ST_Test_autofuse ✅ SUCCESS
ST_Test_executor ✅ SUCCESS
ST_Test_hetero ✅ SUCCESS
ST_Test_autofuse_ascendc_api ✅ SUCCESS
ST_Test_autofuse_e2e ✅ SUCCESS
UT_Test_fe ✅ SUCCESS
UT_Test_tefusion ✅ SUCCESS
ST_Test_fe ✅ SUCCESS
ST_Test_tefusion ✅ SUCCESS
ST_Test_ge_common_atc ✅ SUCCESS
UT_Test_Report_graphengine ✅ SUCCESS >>>>>
UT_Test_Report_ge_executor_c ✅ SUCCESS >>>>>
UT_Test_Report_ge_autofuse ✅ SUCCESS >>>>>
ST_Test_Report_graphengine ✅ SUCCESS >>>>>
ST_Test_Report_ge_executor_c ✅ SUCCESS >>>>>
ST_Test_Report_ge_autofuse ✅ SUCCESS >>>>>
UT_Test_Report_fe ✅ SUCCESS >>>>>
ST_Test_Report_fe ✅ SUCCESS >>>>>

[2026-08-25 10:01:01]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
13 天前 评论:

流水线任务触发成功
任务链接 [6ad19a3eb5604b3c8061e79849b46968][流水线指导]

任务名称状态日志下载链接
pre_comment ✅ SUCCESS >>>>>
Compile_ARM_compiler ✅ SUCCESS >>>>> >>>>>
Compile_ARM_executor ✅ SUCCESS >>>>> >>>>>
Compile_ARM_dflow ✅ SUCCESS >>>>> >>>>>
API_Check ✅ SUCCESS >>>>>
PreSmoke_A900_npupool ✅ SUCCESS >>>>>

[2026-08-25 09:51:08]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
13 天前 评论:

流水线任务触发成功
任务链接 [fe652c7a6db64c748d190a9aab6a1b72][流水线指导]

任务名称状态日志下载链接
codecheck_Pr ✅ SUCCESS
antipoison ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>
codecheck_dt ✅ SUCCESS >>>>>
codecheck_precommit ✅ SUCCESS >>>>>
StaticCheck_codespell ✅ SUCCESS
StaticCheck_link_validity ✅ SUCCESS
StaticCheck_resource_existence ✅ SUCCESS
StaticCheck_tag_closed ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS

[2026-08-25 09:46:49]    CI执行结束

likedislike
CANN-robotCANN-robot成员
13 天前 添加了label:api-check-pass
此处折叠了9条事件消息 查看更多
CANN-robotCANN-robot成员
13 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
13 天前 评论:

Notification

This pull request has been changed(code update) or closed, so removes the following label(s): ci-pipeline-passed.

likedislike
yelongjian成员
13 天前 评论:

compile

likedislike
Yyelongjian成员
13 天前 update merge request[project id: 8824148, iid: 4540, commit_id: 83c1623d35adb749cb3eb248d7cb462d67aaa3c1] virtual merging success
CANN-robotCANN-robot成员
13 天前 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
13 天前 评论:

流水线任务触发成功
任务链接 [7afb4733cfc1453c8ff0c203dc7b7f97][流水线指导]

任务名称状态日志下载链接
pre_comment ✅ SUCCESS >>>>>
Compile_ARM_compiler ✅ SUCCESS >>>>> >>>>>
Compile_ARM_executor ✅ SUCCESS >>>>> >>>>>
Compile_ARM_dflow ✅ SUCCESS >>>>> >>>>>
API_Check ✅ SUCCESS >>>>>
PreSmoke_A900_npupool ✅ SUCCESS >>>>>

[2026-08-25 14:41:52]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
13 天前 评论:

流水线任务触发成功
任务链接 [8d9989adb51c4f93ad892dc9c66ae214][流水线指导]

任务名称状态日志下载链接
pre_comment ✅ SUCCESS >>>>>
Compile_X86_compiler ✅ SUCCESS >>>>> >>>>>
Compile_X86_executor ✅ SUCCESS >>>>> >>>>>
Compile_X86_dflow ✅ SUCCESS >>>>> >>>>>
UT_Test_dflow ✅ SUCCESS
UT_Test_ge_common ✅ SUCCESS
UT_Test_parser ✅ SUCCESS
UT_Test_python ✅ SUCCESS >>>>>
UT_Test_rt ✅ SUCCESS
UT_Test_acl ✅ SUCCESS
UT_Test_autofuse ✅ SUCCESS
UT_Test_executor ✅ SUCCESS
UT_Test_autofuse_ascendc_api ✅ SUCCESS
ST_Test_dflow ✅ SUCCESS
ST_Test_ge_common ✅ SUCCESS
ST_Test_parser ✅ SUCCESS
ST_Test_python ✅ SUCCESS >>>>>
ST_Test_rt ✅ SUCCESS
ST_Test_autofuse ✅ SUCCESS
ST_Test_executor ✅ SUCCESS
ST_Test_hetero ✅ SUCCESS
ST_Test_autofuse_ascendc_api ✅ SUCCESS
ST_Test_autofuse_e2e ✅ SUCCESS
UT_Test_fe ✅ SUCCESS
UT_Test_tefusion ✅ SUCCESS
ST_Test_fe ✅ SUCCESS
ST_Test_tefusion ✅ SUCCESS
ST_Test_ge_common_atc ✅ SUCCESS
UT_Test_Report_graphengine ✅ SUCCESS >>>>>
UT_Test_Report_ge_executor_c ✅ SUCCESS >>>>>
UT_Test_Report_ge_autofuse ✅ SUCCESS >>>>>
ST_Test_Report_graphengine ✅ SUCCESS >>>>>
ST_Test_Report_ge_executor_c ✅ SUCCESS >>>>>
ST_Test_Report_ge_autofuse ✅ SUCCESS >>>>>
UT_Test_Report_fe ✅ SUCCESS >>>>>
ST_Test_Report_fe ✅ SUCCESS >>>>>

[2026-08-25 14:51:54]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
13 天前 评论:

流水线任务触发成功
任务链接 [23d880f6d12b4389a2160e694a03bc9c][流水线指导]

任务名称状态日志下载链接
codecheck_Pr ✅ SUCCESS
antipoison ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>
codecheck_dt ✅ SUCCESS >>>>>
codecheck_precommit ✅ SUCCESS >>>>>
StaticCheck_codespell ✅ SUCCESS
StaticCheck_link_validity ✅ SUCCESS
StaticCheck_resource_existence ✅ SUCCESS
StaticCheck_tag_closed ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS

[2026-08-25 14:38:14]    CI执行结束

likedislike
CANN-robotCANN-robot成员
13 天前 添加了label:api-check-pass
CANN-robotCANN-robot成员
13 天前 删除了label:api-check-pass
CANN-robotCANN-robot成员
13 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
13 天前 添加了label:ci-pipeline-passed
GengChao
GengChao成员
13 天前 评论:

/lgtm

likedislike
yangyongqiang
yangyongqiang成员
13 天前 评论:

/lgtm

likedislike
CANN-robotCANN-robot成员
13 天前 添加了label:lgtm
张德鹏成员
13 天前 评论:

/approve

likedislike
CANN-robotCANN-robot成员
13 天前 添加了label:approved
CANN-robotCANN-robot成员
13 天前 合入了pull request