Commit 978cfd39 authored by John van Groningen's avatar John van Groningen
Browse files

Merge branch 'keep-separate-stdout-and-stderr' into 'master'

Don't redirect compiler stderr to stdout on Windows

See merge request !13
parents a41dee14 d483eb56
Pipeline #45977 passed with stage
in 37 seconds
......@@ -206,6 +206,9 @@ static int list_strict_export_types=0,funcmayfail_warning_or_error=0,nowarn=0;
static char *cocl_redirect_stdout,*cocl_redirect_stdout_option;
static char *cocl_redirect_stderr,*cocl_redirect_stderr_option;
#ifdef _WINDOWS_
static int redirect_stderr_to_stdout=1;
#endif
static int check_stack_overflow,check_indices,dynamics;
#ifdef ARM
......@@ -1510,9 +1513,6 @@ static int start_compiler_process
PROCESS_INFORMATION pi;
SECURITY_ATTRIBUTES sa;
int r;
int redirect_stderr_to_stdout;
redirect_stderr_to_stdout = 1;
/*
a process cannot inherit a console handle on windows, therefore we create copies using pipes
......@@ -4046,6 +4046,10 @@ static void argument_error (void)
#endif
printf (" -RE <file> Redirect compiler stderror to <file>\n");
printf (" -RO <file> Redirect compiler stdout to <file>\n");
#ifdef _WINDOWS_
printf (" -no-redirect-stderr\n");
printf (" Do not redirect stderr of child processes to stdout\n");
#endif
printf ("\nApplication options:\n");
printf (" -h <size> Set the heap size to <size> in bytes\n");
printf (" (note: append k, K, m, or M to denote kilobytes or megabytes)\n");
......@@ -4563,6 +4567,10 @@ int main (int argc,char **argv)
cocl_redirect_stdout = argv [arg_n];
else
error ("file name expected after -RO");
#ifdef _WINDOWS_
} else if (!strcmp (s,"no-redirect-stderr")){
redirect_stderr_to_stdout=0;
#endif
} else if (!strcmp (s,"funcmayfail")){
funcmayfail_warning_or_error=2;
} else if (!strcmp (s,"warnfuncmayfail")){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment