summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-04-18 22:02:23 +0200
committerCaolán McNamara <caolanm@redhat.com>2015-04-21 12:22:52 +0000
commiteccbf9df2e08d78b96b01b891e801fc8ef9b1f88 (patch)
tree9d9284d5a2a43e84f86daa4ff66c173188ae265d
parentc8dbae617b4e165c2047a7808240735f413f3360 (diff)
tdf#82430: gcc-wrappers: command line *must* start with a space
Yes, you read that right, if there's no space in front of the first argument, cl.exe will *ignore* it. Change-Id: I73d9bf026705538e53b5d91091a4c96eb15739b2 (cherry picked from commit c4a267215c10647ff281e9e629faa0a8a201f4b4) Reviewed-on: https://gerrit.libreoffice.org/15381 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com> (cherry picked from commit 0dac335acbcd382fff422e50058d8aa21646a364) Reviewed-on: https://gerrit.libreoffice.org/15435 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--solenv/gcc-wrappers/wrapper.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/solenv/gcc-wrappers/wrapper.cxx b/solenv/gcc-wrappers/wrapper.cxx
index 918a9b59307f..704f33c66077 100644
--- a/solenv/gcc-wrappers/wrapper.cxx
+++ b/solenv/gcc-wrappers/wrapper.cxx
@@ -188,6 +188,11 @@ int startprocess(string command, string args) {
command=command.substr(0,pos+strlen("ccache"))+".exe";
}
+ if (args[0] != ' ')
+ {
+ args.insert(0, " "); // lpCommandLine *must* start with space!
+ }
+
//cerr << "CMD= " << command << " " << args << endl;
// Commandline may be modified by CreateProcess