summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/wasm/Driver.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/wasm/Driver.cpp b/lld/wasm/Driver.cpp
index 3fb6321c87f..1ba07df0317 100644
--- a/lld/wasm/Driver.cpp
+++ b/lld/wasm/Driver.cpp
@@ -298,8 +298,6 @@ void LinkerDriver::link(ArrayRef<const char *> ArgsArr) {
// Make sure we have resolved all symbols.
if (!Config->Relocatable && !Config->AllowUndefined) {
Symtab->reportRemainingUndefines();
- if (errorCount())
- return;
} else {
// When we allow undefined symbols we cannot include those defined in
// -u/--undefined since these undefined symbols have only names and no
@@ -311,6 +309,8 @@ void LinkerDriver::link(ArrayRef<const char *> ArgsArr) {
error("function forced with --undefined not found: " + Sym->getName());
}
}
+ if (errorCount())
+ return;
if (!Config->Entry.empty() && !Symtab->find(Config->Entry)->isDefined())
error("entry point not found: " + Config->Entry);
OpenPOWER on IntegriCloud