Issue error if compiling for multiple targets and program is coming from stdin.

We currently don't support this, so at least now we issue an intelligible error
message in this case.

Issue #269.
This commit is contained in:
Matt Pharr
2012-07-06 13:21:53 -07:00
parent 38bcecd2f3
commit ec0918045d

View File

@@ -2199,6 +2199,12 @@ Module::CompileAndOutput(const char *srcFile,
"compiling C++ output.");
return 1;
}
if (srcFile == NULL || !strcmp(srcFile, "-")) {
Error(SourcePos(), "Compiling programs from standard input isn't "
"supported when compiling for multiple targets. Please use "
"an intermediate temporary file.");
return 1;
}
// The user supplied multiple targets
std::vector<std::string> targets = lExtractTargets(target);