diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-27 05:20:40 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-27 05:20:40 +0000 |
commit | ea631cc184da08a0db7ef5ce3f6ba9df4d02c138 (patch) | |
tree | f6a786e0c729703225b6af4fa8551830b11a0eb8 /mjit.c | |
parent | 6dafb4c910a92b97d026f8984bd661e16ac85899 (diff) | |
download | ruby-ea631cc184da08a0db7ef5ce3f6ba9df4d02c138.tar.gz |
mjit.c: fix cc arguments
* mjit.c (CC_LIBS): MJIT_LIBS is used only on Windows.
* mjit.c (compile_c_to_so): moved source and shared object files
to simplify indexes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mjit.c')
-rw-r--r-- | mjit.c | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -581,10 +581,12 @@ static const char *const CC_DLDFLAGS_ARGS[] = { }; static const char *const CC_LIBS[] = { +#ifdef _WIN32 MJIT_LIBS -#if defined __GNUC__ && !defined __clang__ && !defined _WIN32 +# if defined __GNUC__ && !defined __clang__ "-lmsvcrt", "-lgcc", +# endif #endif NULL }; @@ -653,13 +655,13 @@ compile_c_to_so(const char *c_file, const char *so_file) { int exit_code; const char *files[] = { -#ifdef __clang__ - "-include-pch", NULL, -#endif #ifndef _MSC_VER "-o", #endif NULL, NULL, +#ifdef __clang__ + "-include-pch", NULL, +#endif #ifdef _WIN32 # ifdef _MSC_VER "-link", @@ -683,10 +685,10 @@ compile_c_to_so(const char *c_file, const char *so_file) files[1] = c_file; #else # ifdef __clang__ - files[1] = pch_file; + files[4] = pch_file; # endif - files[numberof(files)-3] = c_file; - files[numberof(files)-4] = so_file; + files[2] = c_file; + files[1] = so_file; #endif args = form_args(5, CC_LDSHARED_ARGS, CC_CODEFLAG_ARGS, files, CC_LIBS, CC_DLDFLAGS_ARGS); |