From 7acb13fdeeac3058337839c5c56b9a7f9f1964e8 Mon Sep 17 00:00:00 2001 From: Kostis Sagonas Date: Sat, 28 Nov 2009 14:33:53 +0100 Subject: dialyzer: make -wx always start the SMP emulator The wx application will only work in the SMP emulator, so the -wx option for 'dialyzer' must force the -smp option when starting the emulator. Make sure that -wx in *any* position on the command line (not only as the first argument) forces the SMP emulator. --- erts/etc/common/dialyzer.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/erts/etc/common/dialyzer.c b/erts/etc/common/dialyzer.c index 9c66be7f0f..4b4c1124f1 100644 --- a/erts/etc/common/dialyzer.c +++ b/erts/etc/common/dialyzer.c @@ -141,6 +141,7 @@ main(int argc, char** argv) int eargc_base; /* How many arguments in the base of eargv. */ char* emulator; char *env; + int i; int need_shell = 0; env = get_env("DIALYZER_EMULATOR"); @@ -167,9 +168,11 @@ main(int argc, char** argv) * Push initial arguments. */ - if (argc > 1 && strcmp(argv[1], "--wx") == 0) { - PUSH2("-smp", "--wx"); /* wx currently requires SMP enabled */ - argc--, argv++; + for (i = 1; i < argc; i++) { + if (strcmp(argv[i], "--wx") == 0) { + PUSH("-smp"); /* wx currently requires SMP enabled */ + break; + } } if (argc > 1 && strcmp(argv[1], "-smp") == 0) { -- cgit v1.2.3