From df3562e87496cf87f2b3a633bfdbdc555ba4c332 Mon Sep 17 00:00:00 2001 From: Yulong Wang <7679871+fs-eire@users.noreply.github.com> Date: Thu, 16 Jan 2025 01:38:11 -0800 Subject: [PATCH] Enable LTO --- cmake/adjust_global_compile_flags.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/adjust_global_compile_flags.cmake b/cmake/adjust_global_compile_flags.cmake index 442654ff44..6859991134 100644 --- a/cmake/adjust_global_compile_flags.cmake +++ b/cmake/adjust_global_compile_flags.cmake @@ -29,8 +29,8 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") # (2) "-flto=thin" does not work correctly for wasm-ld. # we don't set onnxruntime_ENABLE_LTO because it appends flag "-flto=thin" # instead, we manually set CMAKE_CXX_FLAGS "-flto" - #string(APPEND CMAKE_C_FLAGS " -flto") - #string(APPEND CMAKE_CXX_FLAGS " -flto") + string(APPEND CMAKE_C_FLAGS " -flto") + string(APPEND CMAKE_CXX_FLAGS " -flto") endif() if (onnxruntime_ENABLE_WEBASSEMBLY_DEBUG_INFO)