[vala/staging: 1/4] Ignore --thread commandline option and drop all gthread-2.0 references



commit 99aeafe607b29dcdc35b405641c4124595b4c7e6
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Mon Oct 10 10:05:04 2016 +0200

    Ignore --thread commandline option and drop all gthread-2.0 references
    
    With vala 0.32 there was no further support for glib < 2.32.

 codegen/valaccodecompiler.vala     |    3 ---
 codegen/valaccodemethodmodule.vala |   10 ----------
 compiler/valacompiler.vala         |    3 +--
 configure.ac                       |    5 -----
 contrib/parvala/parvala            |    1 -
 doc/valac.1                        |    2 +-
 gobject-introspection/Makefile.am  |    1 -
 gobject-introspection/scanner.c    |    5 -----
 vala/valacodecontext.vala          |    5 -----
 9 files changed, 2 insertions(+), 33 deletions(-)
---
diff --git a/codegen/valaccodecompiler.vala b/codegen/valaccodecompiler.vala
index 1ad3f08..52161b4 100644
--- a/codegen/valaccodecompiler.vala
+++ b/codegen/valaccodecompiler.vala
@@ -61,9 +61,6 @@ public class Vala.CCodeCompiler {
                }
                use_pkgconfig = true;
                pc += " gobject-2.0";
-               if (context.thread) {
-                       pc += " gthread-2.0";
-               }
                foreach (string pkg in context.get_packages ()) {
                        if (package_exists (pkg, pkg_config_command)) {
                                use_pkgconfig = true;
diff --git a/codegen/valaccodemethodmodule.vala b/codegen/valaccodemethodmodule.vala
index d147eb1..aa2ab5c 100644
--- a/codegen/valaccodemethodmodule.vala
+++ b/codegen/valaccodemethodmodule.vala
@@ -836,16 +836,6 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
                                ccode.add_expression (mem_profiler_init_call);
                        }
 
-                       if (context.thread) {
-                               var thread_init_call = new CCodeFunctionCall (new CCodeIdentifier 
("g_thread_init"));
-                               thread_init_call.line = cmain.line;
-                               thread_init_call.add_argument (new CCodeConstant ("NULL"));
-
-                               var cond = new CCodeIfSection ("!GLIB_CHECK_VERSION (2,32,0)");
-                               ccode.add_statement (cond);
-                               cond.append (new CCodeExpressionStatement (thread_init_call));
-                       }
-
                        var cond = new CCodeIfSection ("!GLIB_CHECK_VERSION (2,35,0)");
                        ccode.add_statement (cond);
                        cond.append (new CCodeExpressionStatement (new CCodeFunctionCall (new CCodeIdentifier 
("g_type_init"))));
diff --git a/compiler/valacompiler.vala b/compiler/valacompiler.vala
index ccf5b76..38564fc 100644
--- a/compiler/valacompiler.vala
+++ b/compiler/valacompiler.vala
@@ -124,7 +124,7 @@ class Vala.Compiler {
                { "compile", 'c', 0, OptionArg.NONE, ref compile_only, "Compile but do not link", null },
                { "output", 'o', 0, OptionArg.FILENAME, ref output, "Place output in file FILE", "FILE" },
                { "debug", 'g', 0, OptionArg.NONE, ref debug, "Produce debug information", null },
-               { "thread", 0, 0, OptionArg.NONE, ref thread, "Enable multithreading support", null },
+               { "thread", 0, 0, OptionArg.NONE, ref thread, "Enable multithreading support (DEPRECATED AND 
IGNORED)", null },
                { "enable-mem-profiler", 0, 0, OptionArg.NONE, ref mem_profiler, "Enable GLib memory 
profiler", null },
                { "define", 'D', 0, OptionArg.STRING_ARRAY, ref defines, "Define SYMBOL", "SYMBOL..." },
                { "main", 0, 0, OptionArg.STRING, ref entry_point, "Use SYMBOL as entry point", "SYMBOL..." },
@@ -242,7 +242,6 @@ class Vala.Compiler {
                context.gir_directories = gir_directories;
                context.metadata_directories = metadata_directories;
                context.debug = debug;
-               context.thread = thread;
                context.mem_profiler = mem_profiler;
                context.save_temps = save_temps;
                if (ccode_only && save_temps) {
diff --git a/configure.ac b/configure.ac
index 744a26f..f12d4ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -81,11 +81,6 @@ PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED)
 AC_SUBST(GMODULE_CFLAGS)
 AC_SUBST(GMODULE_LIBS)
 
-PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= $GLIB_REQUIRED)
-
-AC_SUBST(GTHREAD_CFLAGS)
-AC_SUBST(GTHREAD_LIBS)
-
 AC_PATH_PROG([XSLTPROC], [xsltproc], :)
 AM_CONDITIONAL(HAVE_XSLTPROC, test "$XSLTPROC" != :)
 
diff --git a/contrib/parvala/parvala b/contrib/parvala/parvala
index db53b8f..bdea5c1 100755
--- a/contrib/parvala/parvala
+++ b/contrib/parvala/parvala
@@ -20,7 +20,6 @@ while test -n "$*"; do
     --directory=*) VALAFLAGS="${VALAFLAGS} $1";;
     --basedir=*) VALAFLAGS="${VALAFLAGS} $1";;
     --enable-checking) VALAFLAGS="${VALAFLAGS} $1";;
-    --thread) VALAFLAGS="${VALAFLAGS} $1";;
     --pkg=*) VALAFLAGS="${VALAFLAGS} $1";;
     --vapidir=*) VALAFLAGS="${VALAFLAGS} $1";;
     -X) shift; VALAFLAGS="${VALAFLAGS} -X $1";;
diff --git a/doc/valac.1 b/doc/valac.1
index 2d3f70b..d92368a 100644
--- a/doc/valac.1
+++ b/doc/valac.1
@@ -88,7 +88,7 @@ Place output in file \fIFILE\fR
 Produce debug information
 .TP
 .B \--thread
-Enable multithreading support
+Enable multithreading support (DEPRECATED AND IGNORED)
 .TP
 .B \--enable-mem-profiler
 Enable GLib memory profiler
diff --git a/gobject-introspection/Makefile.am b/gobject-introspection/Makefile.am
index 9b30e1f..78d733e 100644
--- a/gobject-introspection/Makefile.am
+++ b/gobject-introspection/Makefile.am
@@ -44,7 +44,6 @@ gen_introspect_SOURCES = \
 gen_introspect_LDADD = \
        $(GLIB_LIBS) \
        $(GMODULE_LIBS) \
-       $(GTHREAD_LIBS) \
        libgidl.la \
        $(NULL)
 
diff --git a/gobject-introspection/scanner.c b/gobject-introspection/scanner.c
index 40e4efe..34728c1 100644
--- a/gobject-introspection/scanner.c
+++ b/gobject-introspection/scanner.c
@@ -1783,11 +1783,6 @@ main (int argc, char **argv)
 
   g_type_init ();
 
-  /* initialize threading as this may be required by libraries that we'll use
-   * libsoup-2.2 is an example of that.
-   */
-  g_thread_init (NULL);
-
   if (include_idls)
     {
       for (i = 0; i < g_strv_length (include_idls); i++)
diff --git a/vala/valacodecontext.vala b/vala/valacodecontext.vala
index ddb9fdf..0407561 100644
--- a/vala/valacodecontext.vala
+++ b/vala/valacodecontext.vala
@@ -139,11 +139,6 @@ public class Vala.CodeContext {
        public int optlevel { get; set; }
 
        /**
-        * Enable multithreading support.
-        */
-       public bool thread { get; set; }
-
-       /**
         * Enable memory profiler.
         */
        public bool mem_profiler { get; set; }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]