Skip to content
Permalink
Browse files
Ignore --thread commandline option and drop all gthread-2.0 references
With vala 0.32 there was no further support for glib < 2.32.
  • Loading branch information
ricotz committed Oct 10, 2016
1 parent 3092923 commit 99aeafe607b29dcdc35b405641c4124595b4c7e6
@@ -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;
@@ -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"))));
@@ -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) {
@@ -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" != :)

@@ -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";;
@@ -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
@@ -44,7 +44,6 @@ gen_introspect_SOURCES = \
gen_introspect_LDADD = \
$(GLIB_LIBS) \
$(GMODULE_LIBS) \
$(GTHREAD_LIBS) \
libgidl.la \
$(NULL)

@@ -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++)
@@ -138,11 +138,6 @@ public class Vala.CodeContext {
*/
public int optlevel { get; set; }

/**
* Enable multithreading support.
*/
public bool thread { get; set; }

/**
* Enable memory profiler.
*/

0 comments on commit 99aeafe

Please sign in to comment.