diff options
author | Yuta Saito <kateinoigakukun@gmail.com> | 2022-01-16 02:34:43 +0900 |
---|---|---|
committer | Yuta Saito <kateinoigakukun@gmail.com> | 2022-01-19 11:19:06 +0900 |
commit | e41b121e94ccce9877824e55f865885bbabe40c3 (patch) | |
tree | eb5d959a77efca34d0e6dda769c3a3f01ce7724b | |
parent | 8a50a6b6f979bdfbf79f5c89f03f46ed7c43b919 (diff) | |
download | ruby-e41b121e94ccce9877824e55f865885bbabe40c3.tar.gz |
[wasm] configure.ac: setup platform specific libraries
These flags are very wasi-libc version specific, so updating wasi-libc
may break the build. But supporting multiple wasi-libc versions in ruby
doesn't have much benefit because wasi-libc is not installed in most
systems.
-rw-r--r-- | configure.ac | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 840fa110a3..f0f3bab570 100644 --- a/configure.ac +++ b/configure.ac @@ -1215,6 +1215,10 @@ main() RUBY_APPEND_OPTIONS(LDFLAGS, "-sFORCE_FILESYSTEM=1") ac_cv_func_shutdown=no ], +[wasi*],[ LIBS="-lm -lwasi-emulated-mman -lwasi-emulated-signal -lwasi-emulated-getpid -lwasi-emulated-process-clocks $LIBS" + RUBY_APPEND_OPTIONS(CFLAGS, -D_WASI_EMULATED_SIGNAL -D_WASI_EMULATED_MMAN -D_WASI_EMULATED_GETPID -D_WASI_EMULATED_PROCESS_CLOCKS) + RUBY_APPEND_OPTIONS(CPPFLAGS, -D_WASI_EMULATED_SIGNAL -D_WASI_EMULATED_MMAN -D_WASI_EMULATED_GETPID -D_WASI_EMULATED_PROCESS_CLOCKS) + ] [ LIBS="-lm $LIBS"]) : ${ORIG_LIBS=$LIBS} |