aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostis Sagonas <[email protected]>2009-11-28 14:33:53 +0100
committerBjörn Gustavsson <[email protected]>2009-11-28 14:33:53 +0100
commit7acb13fdeeac3058337839c5c56b9a7f9f1964e8 (patch)
treefb02a1a8033b6c59871fe71017036b10f390f3f9
parent6448c56ecc7c6584a983c5173fd0748068820698 (diff)
downloadotp-7acb13fdeeac3058337839c5c56b9a7f9f1964e8.tar.gz
otp-7acb13fdeeac3058337839c5c56b9a7f9f1964e8.tar.bz2
otp-7acb13fdeeac3058337839c5c56b9a7f9f1964e8.zip
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.
-rw-r--r--erts/etc/common/dialyzer.c9
1 files 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) {