Report an explicit error when linker invocation fails.

In addition ir makes exit code 1, rather than 0 if it
was the only problem during compilation.
This commit is contained in:
Alexander Gorshenev
2017-09-12 15:50:23 +03:00
committed by alexander-gorshenev
parent 24ba3af7e5
commit c363732eb5
@@ -305,6 +305,7 @@ internal class LinkStage(val context: Context) {
try {
runTool(*linkCommand.toTypedArray())
} catch (e: KonanExternalToolFailure) {
context.reportCompilationError("linker invocation reported errors")
return null
}
if (platform is MacOSBasedPlatform && context.shouldContainDebugInfo()) {