From ec0918045da3714dc0d9892e58f3270faba05a78 Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Fri, 6 Jul 2012 13:21:53 -0700 Subject: [PATCH] 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. --- module.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/module.cpp b/module.cpp index d109645d..1a4ee162 100644 --- a/module.cpp +++ b/module.cpp @@ -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 targets = lExtractTargets(target);