Fix crash with unsupported architectures in Linux/Gnu target triples.
authorFlorian Hahn <florian.hahn@arm.com>
Thu, 1 Dec 2016 11:02:59 +0000 (11:02 +0000)
committerFlorian Hahn <florian.hahn@arm.com>
Thu, 1 Dec 2016 11:02:59 +0000 (11:02 +0000)
commit15be03a922f85c97b65d606d6e8b3691c0d69504
tree7a3fe8f1c3824432621e102d607ae82880845232
parent2ce221646903a31d41fc7cdd98f94a2c50eee23f
Fix crash with unsupported architectures in Linux/Gnu target triples.

Summary: This patch adds a check and an error message to gnutools::Linker::ConstructJob in case the architecture is not supported. For most other operating systems, the error message is created in lib/Basic/Targets.cpp:AllocateTarget, but when construction the linker arguments for the gnutools linker a supported architecture is required.

Reviewers: rafael, joerg, echristo

Subscribers: mehdi_amini, joerg, dschuff, cfe-commits

Differential Revision: https://reviews.llvm.org/D27066

llvm-svn: 288327
clang/lib/Driver/Tools.cpp
clang/test/Driver/unsupported-target-arch.c [new file with mode: 0644]