mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
mjit.c: initial cygwin support
thread_pthread.c: Drop pthread_attr_setscope usage. It seems that, at least on Linux and macOS, PTHREAD_SCOPE_PROCESS is not supported and thus PTHREAD_SCOPE_SYSTEM should be used by default. Let's just stop calling this until we find some platform that needs `pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)`. [Misc #14854] From: fd0 (Daisuke Fujimura) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d62b7e133e
commit
ea0cede5aa
2 changed files with 4 additions and 3 deletions
6
mjit.c
6
mjit.c
|
@ -610,7 +610,7 @@ static const char *const CC_DLDFLAGS_ARGS[] = {
|
|||
MJIT_DLDFLAGS
|
||||
#if defined __GNUC__ && !defined __clang__
|
||||
"-nostartfiles",
|
||||
# ifndef _WIN32
|
||||
# if !defined(_WIN32) && !defined(__CYGWIN__)
|
||||
"-nodefaultlibs", "-nostdlib",
|
||||
# endif
|
||||
#endif
|
||||
|
@ -618,10 +618,12 @@ static const char *const CC_DLDFLAGS_ARGS[] = {
|
|||
};
|
||||
|
||||
static const char *const CC_LIBS[] = {
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
MJIT_LIBS
|
||||
# if defined __GNUC__ && !defined __clang__
|
||||
# if defined(_WIN32)
|
||||
"-lmsvcrt",
|
||||
# endif
|
||||
"-lgcc",
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -1757,7 +1757,6 @@ rb_thread_create_mjit_thread(void (*child_hook)(void), void (*worker_func)(void)
|
|||
|
||||
/* jit_worker thread is not to be joined */
|
||||
if (pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED) == 0
|
||||
&& pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM) == 0
|
||||
&& pthread_create(&worker_pid, &attr, mjit_worker, (void *)worker_func) == 0) {
|
||||
ret = TRUE;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue