Skip to content

Commit 8d456b3

Browse files
committed
Targeted reorder fix
1 parent a7d0931 commit 8d456b3

3 files changed

Lines changed: 4 additions & 12 deletions

File tree

ci/scripts/python_build_emscripten.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,4 @@ unset LDFLAGS CFLAGS CXXFLAGS CPPFLAGS
4040

4141
pushd "${python_build_dir}"
4242
pyodide build
43-
# Verify PyInit_lib export has been kept
44-
python -c "
45-
import glob, zipfile
46-
whl = glob.glob('dist/pyarrow-*.whl')[0]
47-
z = zipfile.ZipFile(whl)
48-
so = [n for n in z.namelist() if n.endswith('lib.cpython-312-wasm32-emscripten.so')][0]
49-
print(so, 'contains PyInit_lib:', b'PyInit_lib' in z.read(so))
50-
"
5143
popd

cpp/cmake_modules/SetupCxxFlags.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -733,8 +733,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
733733
# 1) Tell it to use JavaScript / WebAssembly 64 bit number support.
734734
# 2) Tell it to build with support for C++ exceptions
735735
# 3) Skip linker flags error which happens with -soname parameter
736-
set(ARROW_EMSCRIPTEN_LINKER_FLAGS
737-
"-sWASM_BIGINT=1 -fexceptions -Wno-error=linkflags --profiling-funcs")
736+
set(ARROW_EMSCRIPTEN_LINKER_FLAGS "-sWASM_BIGINT=1 -fexceptions -Wno-error=linkflags")
738737
set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS
739738
"-sSIDE_MODULE=1 ${ARROW_EMSCRIPTEN_LINKER_FLAGS}")
740739
set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS

cpp/src/arrow/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,8 +1106,9 @@ else()
11061106
endif()
11071107

11081108
if(ARROW_BUILD_BUNDLED_DEPENDENCIES)
1109-
if(CMAKE_CROSSCOMPILING)
1110-
# Undo PREPEND-reversed order to not break Pyodide side-module loading (GH-50774)
1109+
if(CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
1110+
# Restore the archive order (pre-GH-50650). Otherwise, wasm-ld may select
1111+
# duplicate vague-linkage symbols from a different member (GH-50774).
11111112
list(REVERSE ARROW_BUNDLED_STATIC_LIBS)
11121113
endif()
11131114
arrow_car(_FIRST_LIB ${ARROW_BUNDLED_STATIC_LIBS})

0 commit comments

Comments
 (0)