Skip to content

Commit 3b1b183

Browse files
authored
Check for invalid combination of python + minimal build in build.py (#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
1 parent 19952c5 commit 3b1b183

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

tools/ci_build/build.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -2536,11 +2536,15 @@ def main():
25362536
if args.build_nuget and cross_compiling:
25372537
raise BuildError("Currently nuget package creation is not supported while cross-compiling")
25382538

2539-
if args.enable_pybind and args.disable_rtti:
2540-
raise BuildError("Python bindings use typeid so you can't disable RTTI")
2539+
if args.enable_pybind:
2540+
if args.disable_rtti:
2541+
raise BuildError("Python bindings use typeid so you can't disable RTTI")
25412542

2542-
if args.enable_pybind and args.disable_exceptions:
2543-
raise BuildError("Python bindings require exceptions to be enabled.")
2543+
if args.disable_exceptions:
2544+
raise BuildError("Python bindings require exceptions to be enabled.")
2545+
2546+
if args.minimal_build is not None:
2547+
raise BuildError("Python bindings are not supported in a minimal build.")
25442548

25452549
if args.nnapi_min_api:
25462550
if not args.use_nnapi:

0 commit comments

Comments
 (0)