Build generic lib when primary ep is selected and qnn is not static

This commit is contained in:
Karim Vadsariya 2025-01-29 00:08:05 -08:00
parent 5407c69028
commit e426dec3c2

View file

@ -1543,12 +1543,6 @@ def generate_build_tree(
"-Donnxruntime_USE_FULL_PROTOBUF=ON",
]
# When this flag is enabled, that means we only build ONNXRuntime shared library, expecting some compatible EP
# shared lib being build in a seperate process. So we skip the test for now as ONNXRuntime shared lib built under
# this flag is not expected to work alone
if args.enable_generic_interface:
cmake_args += ["-Donnxruntime_BUILD_UNIT_TESTS=OFF"]
if args.enable_lazy_tensor:
import torch
@ -2651,6 +2645,9 @@ def main():
print(args)
if args.build_shared_lib and args.use_qnn != "static_lib" and (args.use_tensorrt or args.use_openvino or args.use_vitisai or args.use_qnn):
args.enable_generic_interface = True
if os.getenv("ORT_BUILD_WITH_CACHE") == "1":
args.use_cache = True
@ -2669,9 +2666,6 @@ def main():
# Disable ONNX Runtime's builtin memory checker
args.disable_memleak_checker = True
if args.enable_generic_interface:
args.test = False
# If there was no explicit argument saying what to do, default
# to update, build and test (for native builds).
if not (args.update or args.clean or args.build or args.test or args.gen_doc):