aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Target/JSBackend/JSBackend.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/JSBackend/JSBackend.cpp b/lib/Target/JSBackend/JSBackend.cpp
index 0e0e199c49..76f1a630e0 100644
--- a/lib/Target/JSBackend/JSBackend.cpp
+++ b/lib/Target/JSBackend/JSBackend.cpp
@@ -2346,6 +2346,10 @@ void JSWriter::printModule(const std::string& fname,
}
bool JSWriter::runOnModule(Module &M) {
+ if (M.getTargetTriple() != "asmjs-unknown-emscripten") {
+ prettyWarning() << "incorrect target triple '" << M.getTargetTriple() << "' (did you use emcc/em++ on all source files and not clang directly?)\n";
+ }
+
TheModule = &M;
DL = &getAnalysis<DataLayout>();