-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from ereslibre/ruby-flavours
feature: Add slim and batteries-included Ruby version flavours
- Loading branch information
Showing
7 changed files
with
78 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
|
||
if [[ ! -v WASMLABS_ENV ]] | ||
then | ||
echo "Wasmlabs environment is not set" | ||
exit 1 | ||
fi | ||
|
||
cd "${WASMLABS_SOURCE_PATH}" | ||
|
||
export PREFIX=/wlr-rubies | ||
|
||
if [[ -z "$WASMLABS_SKIP_CONFIGURE" ]]; then | ||
logStatus "Downloading autotools data... " | ||
ruby tool/downloader.rb -d tool -e gnu config.guess config.sub | ||
|
||
logStatus "Generating configure script... " | ||
./autogen.sh | ||
|
||
logStatus "Configuring ruby..." | ||
./configure \ | ||
--host wasm32-unknown-wasi \ | ||
--prefix=$PREFIX \ | ||
--with-ext="" \ | ||
--with-static-linked-ext \ | ||
--disable-install-doc \ | ||
LDFLAGS=" \ | ||
-Xlinker --stack-first \ | ||
-Xlinker -z -Xlinker stack-size=16777216 \ | ||
" \ | ||
optflags="-O2" \ | ||
debugflags="" \ | ||
wasmoptflags="-O2" | ||
else | ||
logStatus "Skipping configure..." | ||
fi | ||
|
||
logStatus "Building ruby..." | ||
make install | ||
|
||
logStatus "Preparing artifacts... " | ||
mv $PREFIX/bin/ruby ${WASMLABS_OUTPUT}/bin/ruby.wasm || exit 1 | ||
|
||
logStatus "DONE. Artifacts in ${WASMLABS_OUTPUT}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [[ $1 == "--unset" ]] | ||
then | ||
unset WASMLABS_REPO | ||
unset WASMLABS_REPO_NAME | ||
return | ||
fi | ||
|
||
export WASMLABS_REPO=https://github.com/ruby/ruby.git | ||
export WASMLABS_REPO_NAME=ruby | ||
export WASMLABS_REPO_BRANCH=v3_2_0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export WLR_TAG="ruby/3.2.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters