[vala/0.42] compiler: Report deprecated command-line option "--thread"
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.42] compiler: Report deprecated command-line option "--thread"
- Date: Mon, 21 Jan 2019 16:57:56 +0000 (UTC)
commit aa315a80b4690ba5e58e0bd811036e581352f22c
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Fri Jan 18 14:19:54 2019 +0100
compiler: Report deprecated command-line option "--thread"
compiler/valacompiler.vala | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/compiler/valacompiler.vala b/compiler/valacompiler.vala
index b6a21e537..fdeece901 100644
--- a/compiler/valacompiler.vala
+++ b/compiler/valacompiler.vala
@@ -65,7 +65,6 @@ class Vala.Compiler {
static bool compile_only;
static string output;
static bool debug;
- static bool thread;
static bool mem_profiler;
static bool disable_assert;
static bool enable_checking;
@@ -129,7 +128,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 (DEPRECATED AND
IGNORED)", null },
+ { "thread", 0, OptionFlags.OPTIONAL_ARG, OptionArg.CALLBACK, (void*) option_deprecated,
"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..." },
@@ -176,6 +175,11 @@ class Vala.Compiler {
return true;
}
+ static bool option_deprecated (string option_name, string? val, void* data) throws OptionError {
+ stdout.printf ("Command-line option `%s` is deprecated and will be ignored\n", option_name);
+ return true;
+ }
+
private int quit () {
if (context.report.get_errors () == 0 && context.report.get_warnings () == 0) {
return 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]