From af1e75f9e1adc1d8c34a8565a13faa1c81c9385d Mon Sep 17 00:00:00 2001 From: Yulong Wang <7679871+fs-eire@users.noreply.github.com> Date: Tue, 14 Jan 2025 11:13:01 -0800 Subject: [PATCH] Base commit for using EMSDK 3.1.74 (LTO disabled) --- .gitmodules | 2 +- cgmanifests/generated/cgmanifest.json | 2 +- cmake/adjust_global_compile_flags.cmake | 6 +++--- cmake/external/emsdk | 2 +- tools/ci_build/build.py | 2 +- .../github/azure-pipelines/templates/linux-wasm-ci.yml | 8 ++++---- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.gitmodules b/.gitmodules index 29ca8821f8eb8..7b5be57db96bb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,4 +7,4 @@ [submodule "cmake/external/emsdk"] path = cmake/external/emsdk url = https://github.com/emscripten-core/emsdk.git - branch = 3.1.59 + branch = 3.1.74 diff --git a/cgmanifests/generated/cgmanifest.json b/cgmanifests/generated/cgmanifest.json index da79918310adf..dccca95565c86 100644 --- a/cgmanifests/generated/cgmanifest.json +++ b/cgmanifests/generated/cgmanifest.json @@ -6,7 +6,7 @@ "component": { "type": "git", "git": { - "commitHash": "d52c46520124845b1e0e0525f2759299d840143f", + "commitHash": "3d6d8ee910466516a53e665b86458faa81dae9ba", "repositoryUrl": "https://github.com/emscripten-core/emsdk.git" }, "comments": "git submodule at cmake/external/emsdk" diff --git a/cmake/adjust_global_compile_flags.cmake b/cmake/adjust_global_compile_flags.cmake index 8b5a744e497a6..442654ff442d6 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) @@ -372,4 +372,4 @@ endif() if (onnxruntime_USE_EXTENSIONS) include_directories(${REPO_ROOT}/include/onnxruntime/core/session) -endif() \ No newline at end of file +endif() diff --git a/cmake/external/emsdk b/cmake/external/emsdk index d52c465201248..3d6d8ee910466 160000 --- a/cmake/external/emsdk +++ b/cmake/external/emsdk @@ -1 +1 @@ -Subproject commit d52c46520124845b1e0e0525f2759299d840143f +Subproject commit 3d6d8ee910466516a53e665b86458faa81dae9ba diff --git a/tools/ci_build/build.py b/tools/ci_build/build.py index ed5efac274df0..318396aa71da0 100644 --- a/tools/ci_build/build.py +++ b/tools/ci_build/build.py @@ -478,7 +478,7 @@ def convert_arg_line_to_args(self, arg_line): # WebAssembly build parser.add_argument("--build_wasm", action="store_true", help="Build for WebAssembly") parser.add_argument("--build_wasm_static_lib", action="store_true", help="Build for WebAssembly static library") - parser.add_argument("--emsdk_version", default="3.1.59", help="Specify version of emsdk") + parser.add_argument("--emsdk_version", default="3.1.74", help="Specify version of emsdk") parser.add_argument("--enable_wasm_simd", action="store_true", help="Enable WebAssembly SIMD") parser.add_argument("--enable_wasm_threads", action="store_true", help="Enable WebAssembly multi-threads support") diff --git a/tools/ci_build/github/azure-pipelines/templates/linux-wasm-ci.yml b/tools/ci_build/github/azure-pipelines/templates/linux-wasm-ci.yml index 3ab1cd45ff5f7..29eb322cc4812 100644 --- a/tools/ci_build/github/azure-pipelines/templates/linux-wasm-ci.yml +++ b/tools/ci_build/github/azure-pipelines/templates/linux-wasm-ci.yml @@ -86,15 +86,15 @@ jobs: - script: | set -ex cd '$(Build.SourcesDirectory)/cmake/external/emsdk' - ./emsdk install 3.1.59 ccache-git-emscripten-64bit - ./emsdk activate 3.1.59 ccache-git-emscripten-64bit + ./emsdk install 3.1.74 ccache-git-emscripten-64bit + ./emsdk activate 3.1.74 ccache-git-emscripten-64bit displayName: 'emsdk install and activate ccache for emscripten' - ${{if eq(parameters.WithCache, false)}}: - script: | set -ex cd '$(Build.SourcesDirectory)/cmake/external/emsdk' - ./emsdk install 3.1.59 - ./emsdk activate 3.1.59 + ./emsdk install 3.1.74 + ./emsdk activate 3.1.74 displayName: 'emsdk install and activate ccache for emscripten' - template: build-linux-wasm-step.yml