Skip to content

[Build] Warnings Treated as Errors in Windows Build for x86 platform on ORT Version 1.10.0 #23160

Open
@HenrryQin

Description

Describe the issue

I am facing an issue where warnings are being treated as errors during the build process on the Windows platform targeting the x86 architecture with ONNX Runtime version 1.10.0(I need to support Windows 7-32bit). Upon investigating the build.py script, I found that the use_dev_mode(args) function sets onnxruntime_DEV_MODE to ON, which seems to be causing the warnings to be treated as errors. I have not been able to find a parameter to pass to disable this behavior.

I have checked the higher versions of ONNX Runtime and noticed that the compile_no_warning_as_error parameter was introduced in version 1.14.0 to address this issue. However, I am wondering if there is a way to achieve the same effect in version 1.10.0 by passing a parameter to build.bat.

As a workaround, I have tried setting use_dev_mode(args) to return OFF directly, which resolved my issue. However, I would like to know if there is an official parameter that can be used for this purpose in the 1.10.0 version.

I have reviewed the documentation and existing issues but did not find a solution for this specific version.
I am aware of the compile_no_warning_as_error parameter in version 1.14.0, but I need a solution for version 1.10.0.
Is there a parameter that can be passed to build.bat in version 1.10.0 to treat warnings as informational messages instead of errors? Any guidance on this matter would be greatly appreciated.

Thank you for your attention to this issue.

Urgency

Low or Middle

Target platform

Windows-x86

Build script

.\build.bat --build_dir .\build --update --config RelWithDebInfo --build_shared_lib --parallel --x86 --skip_submodule_sync --cmake_generator "Visual Studio 17 2022" --enable_msvc_static_runtime

Error / output

Image

Visual Studio Version

2022

GCC / Compiler Version

No response

Metadata

Assignees

No one assigned

    Labels

    buildbuild issues; typically submitted using templateplatform:windowsissues related to the Windows platformstaleissues that have not been addressed in a while; categorized by a bot

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions