aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-03-14 19:42:52 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-03-14 19:42:52 -0700
commit2a8f11112ce7a5475c50a81e055b92b6120e3f59 (patch)
tree56157af51bd728e91dd4c3b972a398c9f1c9fb89 /lib
parent5efd13acf148d17fe64f268b3684545b6888303f (diff)
warn if given the wrong triple
Diffstat (limited to 'lib')
-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>();