[Build] Build for WASM with WebNN enabled and Exceptions disabled has error with gsl::narrow
#22712
Labels
build
build issues; typically submitted using template
contributions welcome
lower priority issues for the core ORT teams
ep:WebGPU
ort-web webgpu provider
ep:WebNN
WebNN execution provider
platform:web
issues related to ONNX Runtime web; typically submitted using template
Describe the issue
If you build for webassembly with
--use_webnn
and--disable_exceptions
, there is a piece of code here:onnxruntime/onnxruntime/core/providers/webnn/builders/impl/split_op_builder.cc
Lines 76 to 77 in c64459f
It uses
gsl::narrow
which fails to compileIf we check narrow.h, it says that we should use
onnxruntime::narrow
in the case where exceptions are disabled. Replacinggsl::narrow
withonnxruntime::narrow
lets my build succeed:Urgency
No response
Target platform
WebAssembly
Build script
Error / output
Visual Studio Version
No response
GCC / Compiler Version
No response
The text was updated successfully, but these errors were encountered: