sys::Program::ExecuteAndWait() requires that the first element in "args" should be the name of the program, but (at least) llvm-ld.cpp and gccld.cpp fail to do so, thereby effectively swallowing the first parameter.
This is the reason that -native-cbe has not working for some time - actually I wonder why no other problems have been caused by this...
Ok, yeah this did cause some problems with the ToolRunner.cpp file which I fixed quite a while ago. The problem was introduced due to some refactoring reid did with the program api's. Thanks for pointing this out!
Please revisit all callers of ExecuteAndWait().
The only one I'm not sure of is the llvmc usage of it in CompilerDriver.cpp. Reid, when you get a chance, can you verify that it is ok?