diff --git a/tools/ci_build/build.py b/tools/ci_build/build.py index c90f97ac529d4..ed87640b9e0d8 100644 --- a/tools/ci_build/build.py +++ b/tools/ci_build/build.py @@ -1177,11 +1177,14 @@ def generate_build_tree( ) add_default_definition(cmake_extra_defines, "ONNX_USE_MSVC_STATIC_RUNTIME", "ON") add_default_definition(cmake_extra_defines, "protobuf_MSVC_STATIC_RUNTIME", "ON") + # The following build option was added in ABSL 20240722.0 and it must be explicitly set + add_default_definition(cmake_extra_defines, "ABSL_MSVC_STATIC_RUNTIME", "ON") add_default_definition(cmake_extra_defines, "gtest_force_shared_crt", "OFF") else: # CMAKE_MSVC_RUNTIME_LIBRARY is default to MultiThreaded$<$:Debug>DLL add_default_definition(cmake_extra_defines, "ONNX_USE_MSVC_STATIC_RUNTIME", "OFF") add_default_definition(cmake_extra_defines, "protobuf_MSVC_STATIC_RUNTIME", "OFF") + add_default_definition(cmake_extra_defines, "ABSL_MSVC_STATIC_RUNTIME", "OFF") add_default_definition(cmake_extra_defines, "gtest_force_shared_crt", "ON") if acl_home and os.path.exists(acl_home):