BLD Update package build script's default ldflags (#817)

This commit is contained in:
Dexter Chua 2020-12-03 21:27:40 +08:00 committed by GitHub
parent a7b1901775
commit d67648a6b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 31 deletions

View File

@ -30,7 +30,7 @@ jobs:
- restore_cache:
keys:
- v1-emsdk-{{ checksum "emsdk/Makefile" }}-v20200709-
- v1-emsdk-{{ checksum "emsdk/Makefile" }}-v20201203-
- run:
name: dependencies
@ -52,7 +52,7 @@ jobs:
paths:
- ./emsdk/emsdk
- ~/.ccache
key: v1-emsdk-{{ checksum "emsdk/Makefile" }}-v20200709-{{ .BuildNum }}
key: v1-emsdk-{{ checksum "emsdk/Makefile" }}-v20201203-{{ .BuildNum }}
- persist_to_workspace:
root: .
@ -71,7 +71,7 @@ jobs:
# this cache is generated by the main build job, we never store it here
- restore_cache:
keys:
- v1-emsdk-{{ checksum "emsdk/Makefile" }}-v20200709-
- v1-emsdk-{{ checksum "emsdk/Makefile" }}-v20201203-
- run:
name: dependencies

View File

@ -17,18 +17,3 @@ export PYTHONINCLUDE=$(PYODIDE_ROOT)/cpython/installs/python-$(PYVERSION)/includ
# This env variable is used to detect pyodide at build time,
# do not rename it.
export PYODIDE_PACKAGE_ABI=1
export SIDE_LDFLAGS=\
-O2 \
-s "BINARYEN_METHOD='native-wasm'" \
-Werror \
-s EMULATED_FUNCTION_POINTERS=1 \
-s EMULATE_FUNCTION_POINTER_CASTS=1 \
-s SIDE_MODULE=1 \
-s WASM=1 \
-s "BINARYEN_TRAP_MODE='clamp'" \
--memory-init-file 0 \
-s LINKABLE=1 \
-s EXPORT_ALL=1 \
-s ERROR_ON_MISSING_LIBRARIES=0 \
-s ASSERTIONS=1

View File

@ -20,6 +20,8 @@
[#480](https://github.com/iodide-project/pyodide/pull/480)
- New packages: freesasa, lxml, python-sat, traits, astropy
- Updated packages: numpy 1.15.4, pandas 1.0.5 among others.
- Updated default `--ldflags` argument to `pyodide_build` scripts to equal what
pyodide actually uses.
## Version 0.15.0

View File

@ -3,7 +3,7 @@ include ../Makefile.envs
all: deps
../bin/pyodide buildall . ../build \
--package_abi=$(PYODIDE_PACKAGE_ABI) --ldflags="$(SIDE_LDFLAGS)" --host=$(HOSTPYTHONROOT) --target=$(TARGETPYTHONROOT) --only $(PYODIDE_PACKAGES)
--package_abi=$(PYODIDE_PACKAGE_ABI) --host=$(HOSTPYTHONROOT) --target=$(TARGETPYTHONROOT) --only $(PYODIDE_PACKAGES)
update-all:
for pkg in $$(find . -maxdepth 1 -type d -exec basename {} \; | tail -n +2); do \

View File

@ -6,24 +6,25 @@ ROOTDIR = Path(__file__).parents[1].resolve() / "tools"
HOSTPYTHON = ROOTDIR / ".." / "cpython" / "build" / "3.8.2" / "host"
TARGETPYTHON = ROOTDIR / ".." / "cpython" / "installs" / "python-3.8.2"
DEFAULTCFLAGS = ""
# fmt: off
DEFAULTLDFLAGS = " ".join(
[
"-O2",
"-s",
"BINARYEN_METHOD='native-wasm'",
"-s", "BINARYEN_METHOD='native-wasm'",
"-Werror",
"-s",
"EMULATED_FUNCTION_POINTERS=1",
"-s",
"EMULATE_FUNCTION_POINTER_CASTS=1",
"-s",
"SIDE_MODULE=1",
"-s",
"WASM=1",
"--memory-init-file",
"0",
"-s", "EMULATED_FUNCTION_POINTERS=1",
"-s", "EMULATE_FUNCTION_POINTER_CASTS=1",
"-s", "SIDE_MODULE=1",
"-s", "WASM=1",
"-s", "BINARYEN_TRAP_MODE='clamp'",
"--memory-init-file", "0",
"-s", "LINKABLE=1",
"-s", "EXPORT_ALL=1",
"-s", "ERROR_ON_MISSING_LIBRARIES=0",
"-s", "ASSERTIONS=1",
]
)
# fmt: on
def parse_package(package):