| fix: disable pybind11 IPO for Python extension
Co-authored-by: suqwe<sujianjia@huawei.com>
# message auto-generated for no-merge-commit merge:
!313 merge fix/issue-236-python-extension-ipo into master
fix: disable pybind11 IPO for Python extension
Created-by: suqwe
Commit-by: suqwe
Merged-by: cann-robot
Description: ## 描述
<!--在这里详细描述你的改动,包括改动的原因和所采取的方法。-->
## Summary
- Move CMAKE_INTERPROCEDURAL_OPTIMIZATION OFF before find_package(pybind11 REQUIRED) in the Python wrapper CMake file.
- Prevent pybind11 from enabling/probing IPO/LTO flags that cause bisheng to reject -ffat-lto-objects.
- Keep setup.py unchanged, including the existing compiler selection behavior.
## Validation
- bash scripts/build.sh -python_extension passed.
- _pyshmem.cpython-311-aarch64-linux-gnu.so generated successfully.
- dist/shmem-1.0.0-cp311-cp311-linux_aarch64.whl generated successfully.
- The original bisheng: error: optimization flag '-ffat-lto-objects' is not supported error did not reappear.
Fixes #236
## 关联的Issue
<!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #123-->
<!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。-->
https://gitcode.com/cann/shmem/issues/236
## 测试
<!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。-->
构建验证通过
## 文档更新
<!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。-->
NA
## 类型标签
<!-- [x] 表示选中 -->
- [x ] Bug修复
- [ ] 新特性
- [ ] 性能优化
- [ ] 文档更新
- [ ] 其他,请描述:
See merge request: cann/shmem!313 | 24 天前 |