From 7a886ac7a0e02dc8decf91743f6eed1fb08937e7 Mon Sep 17 00:00:00 2001 From: TL Date: Thu, 10 Oct 2024 17:09:22 +0800 Subject: [PATCH] use build for llvm libraries build diretory for all platform, conditionally set multi-line separator in CI --- .github/workflows/build_iwasm_release.yml | 35 ++++++++++++++++++++++- wamr-compiler/CMakeLists.txt | 13 ++------- 2 files changed, 37 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build_iwasm_release.yml b/.github/workflows/build_iwasm_release.yml index 75c3327220..359db8bc66 100644 --- a/.github/workflows/build_iwasm_release.yml +++ b/.github/workflows/build_iwasm_release.yml @@ -50,7 +50,8 @@ jobs: key: ${{ inputs.llvm_cache_key }} fail-on-cache-miss: true - - name: generate iwasm binary release + - name: generate iwasm binary release for non-Windows + if: inputs.runner != 'windows-latest' run: | cmake -S . -B build \ -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_FAST_JIT=1 -DWAMR_BUILD_JIT=1 \ @@ -81,6 +82,38 @@ jobs: cmake --build build --config Release --parallel 4 working-directory: ${{ inputs.cwd }} + - name: generate iwasm binary release for Windows + if: inputs.runner == 'windows-latest' + run: | + cmake -S . -B build ' + -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_FAST_JIT=1 -DWAMR_BUILD_JIT=1 + -DWAMR_BUILD_CUSTOM_NAME_SECTION=0 + -DWAMR_BUILD_DEBUG_INTERP=0 + -DWAMR_BUILD_DEBUG_AOT=0 + -DWAMR_BUILD_DUMP_CALL_STACK=0 + -DWAMR_BUILD_LIBC_UVWASI=0 + -DWAMR_BUILD_LIBC_EMCC=0 + -DWAMR_BUILD_LIB_RATS=0 + -DWAMR_BUILD_LOAD_CUSTOM_SECTION=0 + -DWAMR_BUILD_MEMORY_PROFILING=0 + -DWAMR_BUILD_MINI_LOADER=0 + -DWAMR_BUILD_MULTI_MODULE=0 + -DWAMR_BUILD_PERF_PROFILING=0 + -DWAMR_BUILD_SPEC_TEST=0 + -DWAMR_BUILD_BULK_MEMORY=1 + -DWAMR_BUILD_LIB_PTHREAD=1 + -DWAMR_BUILD_LIB_PTHREAD_SEMAPHORE=1 + -DWAMR_BUILD_LIB_WASI_THREADS=1 + -DWAMR_BUILD_LIBC_BUILTIN=1 + -DWAMR_BUILD_LIBC_WASI=1 + -DWAMR_BUILD_REF_TYPES=1 + -DWAMR_BUILD_SIMD=1 + -DWAMR_BUILD_SHARED_MEMORY=1 + -DWAMR_BUILD_TAIL_CALL=1 + -DWAMR_BUILD_THREAD_MGR=1 ' + cmake --build build --config Release --parallel 4 + working-directory: ${{ inputs.cwd }} + - name: Compress the binary on Windows if: inputs.runner == 'windows-latest' run: | diff --git a/wamr-compiler/CMakeLists.txt b/wamr-compiler/CMakeLists.txt index 2ab0462b20..bc7fdf0425 100644 --- a/wamr-compiler/CMakeLists.txt +++ b/wamr-compiler/CMakeLists.txt @@ -163,17 +163,10 @@ endif() # Enable LLVM if (NOT WAMR_BUILD_WITH_CUSTOM_LLVM) set (LLVM_SRC_ROOT "${PROJECT_SOURCE_DIR}/../core/deps/llvm") - if (WAMR_BUILD_PLATFORM STREQUAL "windows") - if (NOT EXISTS "${LLVM_SRC_ROOT}/win32build") - message (FATAL_ERROR "Cannot find LLVM dir: ${LLVM_SRC_ROOT}/win32build") - endif () - set (CMAKE_PREFIX_PATH "${LLVM_SRC_ROOT}/win32build;${CMAKE_PREFIX_PATH}") - else() - if (NOT EXISTS "${LLVM_SRC_ROOT}/build") - message (FATAL_ERROR "Cannot find LLVM dir: ${LLVM_SRC_ROOT}/build") - endif () - set (CMAKE_PREFIX_PATH "${LLVM_SRC_ROOT}/build;${CMAKE_PREFIX_PATH}") + if (NOT EXISTS "${LLVM_SRC_ROOT}/build") + message (FATAL_ERROR "Cannot find LLVM dir: ${LLVM_SRC_ROOT}/build") endif () + set (CMAKE_PREFIX_PATH "${LLVM_SRC_ROOT}/build;${CMAKE_PREFIX_PATH}") endif () find_package(LLVM REQUIRED CONFIG)