Skip to content

Commit

Permalink
Check for invalid combination of python + minimal build in build.py (#…
Browse files Browse the repository at this point in the history
…19463)

### Description
<!-- Describe your changes. -->
Python bindings aren't supported in a minimal build. Check in build.py
so user gets a better error message.



### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
#19422
  • Loading branch information
skottmckay authored Feb 8, 2024
1 parent 19952c5 commit 3b1b183
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tools/ci_build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -2536,11 +2536,15 @@ def main():
if args.build_nuget and cross_compiling:
raise BuildError("Currently nuget package creation is not supported while cross-compiling")

if args.enable_pybind and args.disable_rtti:
raise BuildError("Python bindings use typeid so you can't disable RTTI")
if args.enable_pybind:
if args.disable_rtti:
raise BuildError("Python bindings use typeid so you can't disable RTTI")

if args.enable_pybind and args.disable_exceptions:
raise BuildError("Python bindings require exceptions to be enabled.")
if args.disable_exceptions:
raise BuildError("Python bindings require exceptions to be enabled.")

if args.minimal_build is not None:
raise BuildError("Python bindings are not supported in a minimal build.")

if args.nnapi_min_api:
if not args.use_nnapi:
Expand Down

0 comments on commit 3b1b183

Please sign in to comment.