1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Fix COROUTINE_SRC on emscripten

Select the C source if exists, otherwise the assembler source,
instead of selecting by the coroutine type.
This commit is contained in:
Nobuyoshi Nakada 2021-08-16 13:45:30 +09:00
parent 4cc44bd819
commit 5087a6a924
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6
Notes: git 2021-08-16 18:32:54 +09:00

View file

@ -2573,14 +2573,9 @@ AS_CASE([$coroutine_type], [yes|''], [
COROUTINE_H=coroutine/$coroutine_type/Context.h
AS_IF([test ! -f "$srcdir/$COROUTINE_H"],
[AC_MSG_ERROR('$coroutine_type' is not supported as coroutine)])
AS_CASE([$coroutine_type],
[ucontext|pthread], [
COROUTINE_SRC=coroutine/$coroutine_type/Context.c
],
[
COROUTINE_SRC=coroutine/$coroutine_type/Context.'$(ASMEXT)'
]
)
COROUTINE_SRC=coroutine/$coroutine_type/Context.c
AS_IF([test ! -f "$srcdir/$COROUTINE_SRC"],
[COROUTINE_SRC=coroutine/$coroutine_type/Context.'$(ASMEXT)'])
AC_DEFINE_UNQUOTED(COROUTINE_H, ["$COROUTINE_H"])
AC_SUBST(X_COROUTINE_H, [$COROUTINE_H])
AC_SUBST(X_COROUTINE_SRC, [$COROUTINE_SRC])