-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Mitigate pybind11 build break using Xcode 12 on macOS #5381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
# https://github.com/pybind/pybind11/pull/2522 | ||
# TODO, remove this after switch to pybind11 2.6.0+ | ||
return 'OFF' | ||
return 'ON' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disabling dev mode feels like a fairly severe hack vs. either fixing warnings where possible or disabling specific warnings on specific targets. Whilst this is consistent with the existing approach, it would be good to have a more refined way to handle warnings on iOS/macOS builds than this. Not sure why ACL or ARMNN should need this either. Could you maybe add a task to the ORT Core backlog for someone to investigate improving this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create 3 PBI
Mobile
- Product Backlog Item 920207: Enable dev mode for ORT iOS
Core
- Product Backlog Item 920213: Investigate enabling dev mode for ACL/ARMNN EP
- Product Backlog Item 920214: Remove '-Wno-range-loop-analysis/-Wno-unused-value' flags building on macOS after updating pybind11 to 2.6.0+
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cmake/onnxruntime_python.cmake
Outdated
# Disable pybind11 warning on macOS | ||
# TODO, remove this after switch to pybind11 2.6.0+ | ||
if(APPLE) | ||
# https://github.com/pybind/pybind11/pull/2522 | ||
target_compile_options(onnxruntime_pybind11_state PRIVATE "-Wno-range-loop-analysis") | ||
# https://github.com/pybind/pybind11/pull/2294 | ||
target_compile_options(onnxruntime_pybind11_state PRIVATE "-Wno-unused-value") | ||
endif() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved disable dev mode to disable certain warning flags here, however we cannot check xcode version here since it is possible we are not using xcode as Cmake generator
Decide to still keep the use_dev_mode() in build.py since it will make it clearer to see what disables the dev mode instead of burying it in the generate_build_tree()
[update] added check for AppleClang and versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description: Mitigate pybind11 build break using Xcode 12 on macOS
Motivation and Context