Skip to content

Commit c8a0537

Browse files
author
Sean Ye
committed
set build flags: disable protobuf static link and disable constexpr mutex ctor
1 parent df0095a commit c8a0537

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: tools/ci_build/build.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -1239,8 +1239,9 @@ def generate_build_tree(
12391239
]
12401240

12411241
# VitisAI and OpenVINO providers currently only support full_protobuf option.
1242-
if args.use_full_protobuf or args.use_openvino or args.use_vitisai or args.gen_doc:
1243-
cmake_args += ["-Donnxruntime_USE_FULL_PROTOBUF=ON", "-DProtobuf_USE_STATIC_LIBS=ON"]
1242+
# if args.use_full_protobuf or args.use_openvino or args.use_vitisai or args.gen_doc:
1243+
# cmake_args += ["-Donnxruntime_USE_FULL_PROTOBUF=ON", "-DProtobuf_USE_STATIC_LIBS=ON"]
1244+
cmake_args += ["-Donnxruntime_USE_FULL_PROTOBUF=OFF"]
12441245

12451246
if args.use_tvm and args.llvm_path is not None:
12461247
cmake_args += [f"-DLLVM_DIR={args.llvm_path}"]
@@ -1540,6 +1541,9 @@ def generate_build_tree(
15401541
cflags += ["/MP"]
15411542
else:
15421543
cflags += ["/MP%d" % njobs]
1544+
1545+
cflags += ["/DWIN32", "/D_WINDOWS", "/DWINAPI_FAMILY=100", "/DWINVER=0x0A00", "/D_WIN32_WINNT=0x0A00", "/DNTDDI_VERSION=0x0A000000", "/O2", "/Ob1", "/DNDEBUG", "/D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR"]
1546+
15431547
# Setup default values for cflags/cxxflags/ldflags.
15441548
# The values set here are purely for security and compliance purposes. ONNX Runtime should work fine without these flags.
15451549
if (

0 commit comments

Comments
 (0)