forked from postgres/postgres
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwc
executable file
·29 lines (25 loc) · 1.06 KB
/
wc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#! /usr/bin/env bash
set -eou
SYSROOT="/opt/wasix-sysroot"
PHP_WASIX_DEPS="$(pwd)/../php-wasix-deps"
./configure --host=aarch64-apple-darwin \
--without-icu \
--without-readline \
--enable-static \
--with-ssl=openssl \
PG_SYSROOT="$SYSROOT" \
CC="clang-15 --target=wasm32-wasi --sysroot=$SYSROOT" \
RANLIB=llvm-ranlib-15 \
AR=llvm-ar-15 \
CFLAGS="-matomics -mbulk-memory -mmutable-globals -pthread -mthread-model posix -ftls-model=local-exec \
-fno-trapping-math -D_WASI_EMULATED_MMAN -D_WASI_EMULATED_SIGNAL -D_WASI_EMULATED_PROCESS_CLOCKS \
-g -flto -O2 \
-L$PHP_WASIX_DEPS/lib \
-I$PHP_WASIX_DEPS/include/zlib \
-I$PHP_WASIX_DEPS/include/openssl \
"
LDFLAGS="-Wl,--shared-memory -Wl,--max-memory=4294967296 -Wl,--import-memory -Wl,--export-dynamic \
-Wl,--export=__heap_base -Wl,--export=__stack_pointer -Wl,--export=__data_end -Wl,--export=__wasm_init_tls \
-Wl,--export=__wasm_signal -Wl,--export=__tls_size -Wl,--export=__tls_align -Wl,--export=__tls_base \
-lwasi-emulated-mman -flto -g -Wl,-z,stack-size=8388608"
./wb