Skip to content

Commit

Permalink
fix: wasm ci attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
rustyconover committed Jul 2, 2024
1 parent ebf7422 commit 867db8f
Showing 1 changed file with 23 additions and 10 deletions.
33 changes: 23 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,32 @@ elseif("${OS_NAME}" STREQUAL "osx")
set(Rust_CARGO_TARGET "aarch64-apple-darwin")
endif()
elseif(WIN32)
# if (MINGW AND "${OS_ARCH}" STREQUAL "arm64")
# set(Rust_CARGO_TARGET "aarch64-pc-windows-gnu")
# elseif (MINGW AND "${OS_ARCH}" STREQUAL "amd64")
# set(Rust_CARGO_TARGET "x86_64-pc-windows-gnu")
# elseif (MSVC AND "${OS_ARCH}" STREQUAL "arm64")
# set(Rust_CARGO_TARGET "aarch64-pc-windows-msvc")
# elseif (MSVC AND "${OS_ARCH}" STREQUAL "amd64")
# set(Rust_CARGO_TARGET "x86_64-pc-windows-msvc")
# endif()
elseif("${extracted_platform_prefix}" STREQUAL "wasm")
if (MINGW AND "${OS_ARCH}" STREQUAL "arm64")
set(Rust_CARGO_TARGET "aarch64-pc-windows-gnu")
elseif (MINGW AND "${OS_ARCH}" STREQUAL "amd64")
set(Rust_CARGO_TARGET "x86_64-pc-windows-gnu")
elseif (MSVC AND "${OS_ARCH}" STREQUAL "arm64")
set(Rust_CARGO_TARGET "aarch64-pc-windows-msvc")
elseif (MSVC AND "${OS_ARCH}" STREQUAL "amd64")
set(Rust_CARGO_TARGET "x86_64-pc-windows-msvc")
endif()
endif()

execute_process(
COMMAND rustup target list --installed
OUTPUT_VARIABLE RUST_TARGETS
)
string(FIND "${RUST_TARGETS}" "wasm32-unknown-unknown" WASM_TARGET_FOUND)

if (NOT WASM_TARGET_FOUND EQUAL -1)
set(Rust_CARGO_TARGET "wasm32-unknown-emscripten")
endif()

message(STATUS "RUST_TARGETS: ${RUST_TARGETS}")
message(STATUS "WASM_TARGET_FOUND: ${WASM_TARGET_FOUND}")
message(STATUS "TARGET: ${TARGET}")
message(STATUS "DUCKDB_BUILD_TYPE: ${DUCKDB_BUILD_TYPE}")
message(STATUS "TARGET NAME: ${TARGET_NAME}")
message(STATUS "DUCKDB_PLATFORM: ${DUCKDB_PLATFORM}")
message(STATUS "OS_ARCH: ${OS_ARCH}")
message(STATUS "OS_NAME: ${OS_NAME}")
Expand Down

0 comments on commit 867db8f

Please sign in to comment.