Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cpp/cmake_modules/SetupCxxFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,11 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
"${ARROW_EMSCRIPTEN_LINKER_FLAGS} -sERROR_ON_WASM_CHANGES_AFTER_LINK=1 -sSTACK_SIZE=${ARROW_EMSCRIPTEN_TEST_STACK_SIZE} -sALLOW_MEMORY_GROWTH -lnodefs.js -lnoderawfs.js --pre-js ${BUILD_SUPPORT_DIR}/emscripten-test-init.js"
)
endif()
# Abseil stack trace via emscripten_stack_snapshot() abort on Emscripten<4.0.14
# if offset converter isn't enabled. Emscripten 4.0.14 removed the offset converter
if(EMSCRIPTEN_VERSION VERSION_LESS "4.0.14")
string(APPEND CMAKE_EXE_LINKER_FLAGS " -sUSE_OFFSET_CONVERTER=1")
endif()
else()
set(CMAKE_EXE_LINKER_FLAGS "${ARROW_EMSCRIPTEN_LINKER_FLAGS} -sALLOW_MEMORY_GROWTH")
endif()
Expand Down
17 changes: 0 additions & 17 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2060,25 +2060,8 @@ function(build_protobuf)
"${PROTOBUF_INCLUDE_DIR}"
PARENT_SCOPE)

set(PROTOBUF_PATCH_COMMAND)
if(EMSCRIPTEN)
find_program(PATCH patch)
if(PATCH)
set(PROTOBUF_PATCH_COMMAND ${PATCH} -p1 -i)
else()
find_program(GIT git)
if(GIT)
set(PROTOBUF_PATCH_COMMAND ${GIT} apply)
endif()
endif()
if(PROTOBUF_PATCH_COMMAND)
list(APPEND PROTOBUF_PATCH_COMMAND
${CMAKE_CURRENT_LIST_DIR}/protobuf-emscripten.patch)
endif()
endif()
fetchcontent_declare(protobuf
${FC_DECLARE_COMMON_OPTIONS} OVERRIDE_FIND_PACKAGE
PATCH_COMMAND ${PROTOBUF_PATCH_COMMAND}
URL ${PROTOBUF_SOURCE_URL}
URL_HASH "SHA256=${ARROW_PROTOBUF_BUILD_SHA256_CHECKSUM}")

Expand Down
39 changes: 0 additions & 39 deletions cpp/cmake_modules/protobuf-emscripten.patch

This file was deleted.

6 changes: 4 additions & 2 deletions cpp/src/arrow/util/value_parsing.h
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ static inline bool ParseTimestampISO8601(const char* s, size_t length,
return true;
}

#if defined(_WIN32) || defined(ARROW_WITH_MUSL)
#if defined(_WIN32) || defined(__EMSCRIPTEN__) || defined(ARROW_WITH_MUSL)
static constexpr bool kStrptimeSupportsZone = false;
#else
static constexpr bool kStrptimeSupportsZone = true;
Expand All @@ -818,7 +818,9 @@ static inline bool ParseTimestampStrptime(const char* buf, size_t length,
// Default the day to the first for formats without a day directive, so that
// an explicitly parsed zero day is not mistaken for an omitted one
result.tm_mday = 1;
#ifdef _WIN32
#if defined(_WIN32) || defined(__EMSCRIPTEN__)
// Emscripten's strptime() normalizes out-of-range fields through a JavaScript
// Date (e.g. February 30 becomes March 1), which defeats the checks below
char* ret = arrow_strptime(clean_copy.c_str(), format, &result);
#else
char* ret = strptime(clean_copy.c_str(), format, &result);
Expand Down
Loading