Skip to content

Commit

Permalink
use build for llvm libraries build diretory for all platform, conditi…
Browse files Browse the repository at this point in the history
…onally set multi-line separator in CI
  • Loading branch information
TianlongLiang committed Oct 10, 2024
1 parent 98a4a48 commit 7a886ac
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 11 deletions.
35 changes: 34 additions & 1 deletion .github/workflows/build_iwasm_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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: |
Expand Down
13 changes: 3 additions & 10 deletions wamr-compiler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7a886ac

Please sign in to comment.