Skip to content

Commit bd2db27

Browse files
committed
wasm: Clean up configure arguments
Update statically-linked extension list.
1 parent c1ab2a4 commit bd2db27

1 file changed

Lines changed: 35 additions & 14 deletions

File tree

.github/workflows/wasm.yml

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,13 @@ jobs:
105105
echo "WASI_SDK_PATH=/opt/wasi-sdk" >> $GITHUB_ENV
106106
107107
- name: Build baseruby
108+
id: baseruby
108109
run: |
109110
set -ex
110111
mkdir ../baseruby
111112
pushd ../baseruby
113+
echo "ruby=$PWD/install/bin/ruby" >> $GITHUB_OUTPUT
114+
echo "dump_ast=$PWD/dump_ast" >> $GITHUB_OUTPUT
112115
../src/configure --prefix=$PWD/install
113116
make
114117
make install
@@ -120,20 +123,38 @@ jobs:
120123
working-directory: src
121124

122125
- name: Run configure
123-
run: |
124-
../src/configure \
125-
--host wasm32-unknown-wasi \
126-
--with-baseruby=$PWD/../baseruby/install/bin/ruby \
127-
--with-dump-ast=$PWD/../baseruby/dump_ast \
128-
--with-static-linked-ext \
129-
--with-ext=cgi/escape,continuation,coverage,date,digest/bubblebabble,digest,digest/md5,digest/rmd160,digest/sha1,digest/sha2,etc,fcntl,json,json/generator,json/parser,objspace,pathname,rbconfig/sizeof,ripper,stringio,strscan,monitor \
130-
LDFLAGS=" \
131-
-Xlinker --stack-first \
132-
-Xlinker -z -Xlinker stack-size=16777216 \
133-
" \
134-
optflags="${{ matrix.entry.optflags }}" \
135-
debugflags="${{ matrix.entry.debugflags }}" \
136-
wasmoptflags="${{ matrix.entry.wasmoptflags }} ${{ matrix.entry.debugflags }}"
126+
run: >-
127+
../src/configure
128+
--host wasm32-unknown-wasi
129+
--with-baseruby="${{ steps.baseruby.outputs.ruby }}"
130+
--with-dump-ast="${{ steps.baseruby.outputs.dump_ast }}"
131+
--with-static-linked-ext
132+
--with-ext=${EXTS// /,}
133+
LDFLAGS="
134+
-Xlinker --stack-first
135+
-Xlinker -z -Xlinker stack-size=16777216
136+
"
137+
optflags="${{ matrix.entry.optflags }}"
138+
debugflags="${{ matrix.entry.debugflags }}"
139+
wasmoptflags="${{ matrix.entry.wasmoptflags }} ${{ matrix.entry.debugflags }}"
140+
env:
141+
EXTS:
142+
cgi/escape
143+
continuation
144+
coverage
145+
date
146+
digest
147+
digest/*
148+
erb/escape
149+
etc
150+
fcntl
151+
json
152+
json/*
153+
objspace
154+
rbconfig/sizeof
155+
ripper
156+
stringio
157+
strscan
137158

138159
# miniruby may not be built when cross-compling
139160
- run: make mini ruby

0 commit comments

Comments
 (0)