diff options
author | Matthew Curtis <mcurtis@codeaurora.org> | 2012-12-07 13:52:44 +0000 |
---|---|---|
committer | Matthew Curtis <mcurtis@codeaurora.org> | 2012-12-07 13:52:44 +0000 |
commit | 1dbaef5fe123c588ed6c995dd0a0b79c285433ae (patch) | |
tree | e8acc7bcdde2b2d92eddc79305fb8b7d30d35982 | |
parent | c74e2794bebaab41213f23b27c09c21cb1e1f81b (diff) |
Hexagon TC: add cc1 defaults for hexagon-gcc
compatibility
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169599 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Driver/Tools.cpp | 5 | ||||
-rw-r--r-- | test/Driver/hexagon-toolchain.c | 13 |
2 files changed, 15 insertions, 3 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index a6ad3ab6e1..13f859da54 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -1258,9 +1258,8 @@ void Clang::AddHexagonTargetArgs(const ArgList &Args, "hexagon" + toolchains::Hexagon_TC::GetTargetCPU(Args))); CmdArgs.push_back("-fno-signed-char"); - - if (Args.hasArg(options::OPT_mqdsp6_compat)) - CmdArgs.push_back("-mqdsp6-compat"); + CmdArgs.push_back("-mqdsp6-compat"); + CmdArgs.push_back("-Wreturn-type"); std::string SmallDataThreshold = GetHexagonSmallDataThresholdValue(Args); if (!SmallDataThreshold.empty()) { diff --git a/test/Driver/hexagon-toolchain.c b/test/Driver/hexagon-toolchain.c index a4ef959bab..106eabca4e 100644 --- a/test/Driver/hexagon-toolchain.c +++ b/test/Driver/hexagon-toolchain.c @@ -518,3 +518,16 @@ // CHECK027-NEXT: "{{.*}}/bin/hexagon-as" // CHECK027-NEXT: "{{.*}}/bin/hexagon-ld" // CHECK027-NOT: "-pie" + +// ----------------------------------------------------------------------------- +// Misc Defaults +// ----------------------------------------------------------------------------- +// RUN: %clang -### -target hexagon-unknown-linux \ +// RUN: -ccc-install-dir %S/Inputs/hexagon_tree/qc/bin \ +// RUN: %s 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK028 %s +// CHECK028: "{{.*}}clang{{.*}}" "-cc1" +// CHECK028: "-mqdsp6-compat" +// CHECK028: "-Wreturn-type" +// CHECK028-NEXT: "{{.*}}/bin/hexagon-as" +// CHECK028-NEXT: "{{.*}}/bin/hexagon-ld" |