Skip to content

Commit

Permalink
Address comment: disable WASM on s390x
Browse files Browse the repository at this point in the history
  • Loading branch information
YingJie Fu committed Jun 5, 2024
1 parent 0ae1cfc commit 7ead667
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,11 @@ if (FLB_SYSTEM_MACOS)
include(cmake/macos-setup.cmake)
endif()

# Build for SystemZ - s390x arch
if (FLB_SYSTEM_LINUX)
include(cmake/s390x.cmake)
endif ()

# Extract Git commit information for debug output.
# Note that this is only set when cmake is run, the intent here is to use in CI for verification of releases so is acceptable.
# For a better solution see https://jonathanhamberg.com/post/cmake-embedding-git-hash/ but this is simple and easy.
Expand Down
6 changes: 6 additions & 0 deletions cmake/s390x.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(SystemZ|s390x)")
message(STATUS "Forcing characters to be signed, as on x86_64.")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsigned-char")
message(STATUS "Cannot build WAMR on this platform, so WASM support is disabled.")
set(FLB_WASM OFF)
endif ()

0 comments on commit 7ead667

Please sign in to comment.