Skip to content

Commit

Permalink
Ignore --thread commandline option and drop all gthread-2.0 references
Browse files Browse the repository at this point in the history
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 99aeafe
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 33 deletions.
3 changes: 0 additions & 3 deletions codegen/valaccodecompiler.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 0 additions & 10 deletions codegen/valaccodemethodmodule.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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"))));
Expand Down
3 changes: 1 addition & 2 deletions compiler/valacompiler.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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..." },
Expand Down Expand Up @@ -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) {
Expand Down
5 changes: 0 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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" != :)

Expand Down
1 change: 0 additions & 1 deletion contrib/parvala/parvala
Original file line number Diff line number Diff line change
Expand Up @@ -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";;
Expand Down
2 changes: 1 addition & 1 deletion doc/valac.1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion gobject-introspection/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ gen_introspect_SOURCES = \
gen_introspect_LDADD = \
$(GLIB_LIBS) \
$(GMODULE_LIBS) \
$(GTHREAD_LIBS) \
libgidl.la \
$(NULL)

Expand Down
5 changes: 0 additions & 5 deletions gobject-introspection/scanner.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
Expand Down
5 changes: 0 additions & 5 deletions vala/valacodecontext.vala
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,6 @@ public class Vala.CodeContext {
*/
public int optlevel { get; set; }

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

/**
* Enable memory profiler.
*/
Expand Down

0 comments on commit 99aeafe

Please sign in to comment.