Skip to content

Commit

Permalink
add libuuid support
Browse files Browse the repository at this point in the history
  • Loading branch information
maminrayej committed Jul 5, 2024
1 parent cd36ccf commit ca6fa9a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/reusable-wasix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
OPENSSL_DIR: "/opt/openssl"
ZLIB_DIR: "/opt/zlib"
LIBLZMA_DIR: "/opt/liblzma"
UTIL_LINUX_DIR: "/opt/util-linux"
CROSS_BUILD_PYTHON: cross-build/build
CROSS_BUILD_WASIX: cross-build/wasix
WASIX_INSTALL: /opt/wasix_install
Expand Down Expand Up @@ -64,6 +65,12 @@ jobs:
cd ${{ env.LIBLZMA_DIR }}
./wasix.sh
cp src/liblzma/.libs/liblzma.a liblzma.a
- name: "Compile libuuid"
run: |
git clone https://github.com/wasix-org/util-linux ${{ env.UTIL_LINUX_DIR }}
cd ${{ env.UTIL_LINUX_DIR }}
./wasix.sh
cp -v .libs/libuuid.a .
- name: "Install Wasmer"
run: |
mkdir ${{ env.WASMER_DIR }}
Expand All @@ -76,6 +83,8 @@ jobs:
WASIX_ZLIB_LIBS="-L${{ env.ZLIB_DIR }} -lz" \
WASIX_LIBLZMA_CFLAGS="-I${{ env.LIBLZMA_DIR }}/src/liblzma/api" \
WASIX_LIBLZMA_LIBS="-L${{ env.LIBLZMA_DIR }} -llzma" \
WASIX_LIBUUID_CFLAGS="-I ${{ env.UTIL_LINUX_DIR }}/libuuid/src" \
WASIX_LIBUUID_LIBS="-L ${{ env.UTIL_LINUX_DIR }} -l uuid" \
python3 Tools/wasm/wasm_build.py wasix build
- name: "List dirs"
run: |
Expand Down
3 changes: 3 additions & 0 deletions Tools/wasm/wasix-configure-wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ export LIBLZMA_LIBS=$WASIX_LIBLZMA_LIBS
export ZLIB_CFLAGS=$WASIX_ZLIB_CFLAGS
export ZLIB_LIBS=$WASIX_ZLIB_LIBS

export LIBUUID_CFLAGS=$WASIX_LIBUUID_CFLAGS
export LIBUUID_LIBS=$WASIX_LIBUUID_LIBS

export RANLIB="$WASI_SDK_PATH/bin/ranlib"
export AR="$WASI_SDK_PATH/bin/ar"
export NM="$WASI_SDK_PATH/bin/nm"
Expand Down
2 changes: 1 addition & 1 deletion configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -7519,7 +7519,6 @@ AS_CASE([$ac_sys_system],
[syslog],
[_ctypes_test],
[_ctypes],
[_uuid],
[_testexternalinspection],
[_testimportmultiple],
[_testmultiphase],
Expand All @@ -7532,6 +7531,7 @@ AS_CASE([$ac_sys_system],
[_testclinic],
[fcntl],
[readline],
[mmap],
[xxlimited],
[xxlimited_35],
)
Expand Down

0 comments on commit ca6fa9a

Please sign in to comment.