[前][次][番号順一覧][スレッド一覧]

ruby-changes:50261

From: nobu <ko1@a...>
Date: Mon, 12 Feb 2018 12:39:23 +0900 (JST)
Subject: [ruby-changes:50261] nobu:r62379 (trunk): no --jit-cc

nobu	2018-02-12 12:39:18 +0900 (Mon, 12 Feb 2018)

  New Revision: 62379

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62379

  Log:
    no --jit-cc
    
    * ruby.c (setup_mjit_options): removed --jit-cc option, since
      mjit header is affected by generated config.h which depends on
      the given compiler, so it cannot work with different compilers.

  Modified files:
    trunk/mjit.h
    trunk/ruby.c
Index: mjit.h
===================================================================
--- mjit.h	(revision 62378)
+++ mjit.h	(revision 62379)
@@ -25,21 +25,9 @@ enum rb_mjit_iseq_func { https://github.com/ruby/ruby/blob/trunk/mjit.h#L25
     LAST_JIT_ISEQ_FUNC = 3
 };
 
-/* C compiler used to generate native code. */
-enum rb_mjit_cc {
-    /* Not selected */
-    MJIT_CC_DEFAULT = 0,
-    /* GNU Compiler Collection */
-    MJIT_CC_GCC = 1,
-    /* LLVM/Clang */
-    MJIT_CC_CLANG = 2
-};
-
 /* MJIT options which can be defined on the MRI command line.  */
 struct mjit_options {
     char on; /* flag of MJIT usage  */
-    /* Default: clang for macOS, cl for Windows, gcc for others. */
-    enum rb_mjit_cc cc;
     /* Save temporary files after MRI finish.  The temporary files
        include the pre-compiled header, C code file generated for ISEQ,
        and the corresponding object file.  */
Index: ruby.c
===================================================================
--- ruby.c	(revision 62378)
+++ ruby.c	(revision 62379)
@@ -270,7 +270,6 @@ usage(const char *name, int help) https://github.com/ruby/ruby/blob/trunk/ruby.c#L270
 	M("frozen-string-literal", "", "freeze all string literals (default: disabled)"),
     };
     static const struct message mjit_options[] = {
-        M("--jit-cc=cc",         "", "C compiler to generate native code (gcc, clang)"),
         M("--jit-warnings",      "", "Enable printing MJIT warnings"),
         M("--jit-debug",         "", "Enable MJIT debugging (very slow)"),
         M("--jit-wait",          "", "Wait until JIT compilation is finished everytime (for testing)"),
@@ -912,28 +911,11 @@ set_option_encoding_once(const char *typ https://github.com/ruby/ruby/blob/trunk/ruby.c#L911
 #define set_source_encoding_once(opt, e, elen) \
     set_option_encoding_once("source", &(opt)->src.enc.name, (e), (elen))
 
-static enum rb_mjit_cc
-parse_mjit_cc(const char *s)
-{
-    if (strcmp(s, "gcc") == 0) {
-        return MJIT_CC_GCC;
-    }
-    else if (strcmp(s, "clang") == 0) {
-        return MJIT_CC_CLANG;
-    }
-    else {
-        rb_raise(rb_eRuntimeError, "invalid C compiler `%s' (available C compilers: gcc, clang)", s);
-    }
-}
-
 static void
 setup_mjit_options(const char *s, struct mjit_options *mjit_opt)
 {
     mjit_opt->on = 1;
     if (*s == 0) return;
-    if (strncmp(s, "-cc=", 4) == 0) {
-        mjit_opt->cc = parse_mjit_cc(s + 4);
-    }
     else if (strcmp(s, "-warnings") == 0) {
         mjit_opt->warnings = 1;
     }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]