Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into DmlDev
Browse files Browse the repository at this point in the history
  • Loading branch information
ISS Build Account committed Aug 24, 2020
2 parents 3dd2d53 + 47c4144 commit 1542a8a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
9 changes: 9 additions & 0 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,15 @@ if(onnxruntime_MINIMAL_BUILD)
add_compile_definitions(ORT_MINIMAL_BUILD)
set(onnxruntime_REDUCED_OPS_BUILD ON) # TODO Defaulting to ON. TBD if we should always do that.
set(onnxruntime_DISABLE_RTTI ON)

if (MSVC)
# add MSVC specific flags to reduce build size here
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffunction-sections -fdata-sections")
# TODO: May need to use -dead_strip instead of --gc-sections for iOS(XCode)
add_link_options(-Wl,--gc-sections)
endif()

endif()

if(onnxruntime_DISABLE_RTTI)
Expand Down
2 changes: 2 additions & 0 deletions onnxruntime/core/framework/execution_provider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ IExecutionProvider::GetCapability(const onnxruntime::GraphViewer& graph,
}
}
#else
ORT_UNUSED_PARAMETER(graph);
ORT_UNUSED_PARAMETER(kernel_registries);
ORT_NOT_IMPLEMENTED("IExecutionProvider::GetCapability is not supported in this build.");
#endif

Expand Down
2 changes: 1 addition & 1 deletion onnxruntime/core/framework/kernel_registry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ Status KernelRegistry::TryFindKernel(const onnxruntime::Node& node,

return Status(ONNXRUNTIME, FAIL, "Kernel not found");
#else
ORT_THROW("Kernel hash must be provided in minimal build.")
ORT_THROW("Kernel hash must be provided in minimal build.");
#endif
}

Expand Down

0 comments on commit 1542a8a

Please sign in to comment.