diff options
| author | Petar Jovanovic <petar.jovanovic@imgtec.com> | 2015-07-08 13:07:31 +0000 |
|---|---|---|
| committer | Petar Jovanovic <petar.jovanovic@imgtec.com> | 2015-07-08 13:07:31 +0000 |
| commit | 26a4a40137dc8cc5c9855c76994ee39a58dc19bd (patch) | |
| tree | 1e716a312d6c363964d585276057df3b5ebba3d4 /clang/test | |
| parent | fb1662f563c841058464529125a3e07570e3c61d (diff) | |
| download | bcm5719-llvm-26a4a40137dc8cc5c9855c76994ee39a58dc19bd.tar.gz bcm5719-llvm-26a4a40137dc8cc5c9855c76994ee39a58dc19bd.zip | |
[MIPS] Add support for direct-to-nacl in Clang
For Mips direct-to-nacl, the goal is to be close to le32 front-end and
use Mips32EL backend. This patch defines new NaClMips32ELTargetInfo and
modifies it slightly to be close to le32. It also adds necessary parts,
inline with ARM and X86.
Differential Revision: http://reviews.llvm.org/D10739
llvm-svn: 241678
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Driver/nacl-direct.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/clang/test/Driver/nacl-direct.c b/clang/test/Driver/nacl-direct.c index 9768eab24dc..5fe85762232 100644 --- a/clang/test/Driver/nacl-direct.c +++ b/clang/test/Driver/nacl-direct.c @@ -63,6 +63,29 @@ // CHECK-ARM: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}arm-nacl{{/|\\\\}}usr{{/|\\\\}}lib" // CHECK-ARM: "-Lfoo{{/|\\\\}}lib{{/|\\\\}}arm-nacl" // CHECK-ARM-NOT: -lpthread +// +// RUN: %clang -no-canonical-prefixes -### -o %t.o %s \ +// RUN: -target mipsel-unknown-nacl -resource-dir foo 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-MIPS %s +// CHECK-MIPS: {{.*}}clang{{.*}}" "-cc1" +// CHECK-MIPS: "-fuse-init-array" +// CHECK-MIPS: "-target-cpu" "mips32r2" +// CHECK-MIPS: "-target-abi" "o32" +// CHECK-MIPS: "-mfloat-abi" "hard" +// CHECK-MIPS: "-resource-dir" "foo" +// CHECK-MIPS: "-internal-isystem" "foo{{/|\\\\}}include" +// CHECK-MIPS: "-internal-isystem" "{{.*}}{{/|\\\\}}..{{/|\\\\}}mipsel-nacl{{/|\\\\}}usr{{/|\\\\}}include" +// CHECK-MIPS: "-internal-isystem" "{{.*}}{{/|\\\\}}..{{/|\\\\}}mipsel-nacl{{/|\\\\}}include" +// CHECK-MIPS-NOT: as{{(.exe)?}}" +// CHECK-MIPS: ld{{(.exe)?}}" +// CHECK-MIPS: "--build-id" +// CHECK-MIPS: "-m" "mipselelf_nacl" +// CHECK-MIPS: "-static" +// CHECK-MIPS: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}mipsel-nacl{{/|\\\\}}lib" +// CHECK-MIPS: "-L{{.*}}{{/|\\\\}}..{{/|\\\\}}mipsel-nacl{{/|\\\\}}usr{{/|\\\\}}lib" +// CHECK-MIPS: "-Lfoo{{/|\\\\}}lib{{/|\\\\}}mipsel-nacl" +// CHECK-MIPS: "-lpnacl_legacy" +// CHECK-MIPS-NOT: "-lpthread" // Check that even when the target arch is just "arm" (as will be the case when // it is inferred from the binary name) that we get the right ABI flags @@ -109,3 +132,15 @@ // CHECK-x86_64-CXX: "-internal-isystem" "{{.*}}{{/|\\\\}}..{{/|\\\\}}x86_64-nacl{{/|\\\\}}usr{{/|\\\\}}include" // CHECK-x86_64-CXX: "-internal-isystem" "{{.*}}{{/|\\\\}}..{{/|\\\\}}x86_64-nacl{{/|\\\\}}include" // CHECK-x86_64-CXX: "-lpthread" + +// RUN: %clangxx -no-canonical-prefixes -### -o %t.o %s \ +// RUN: -target mipsel-unknown-nacl -resource-dir foo 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-MIPS-CXX %s +// CHECK-MIPS-CXX: {{.*}}clang{{.*}}" "-cc1" +// CHECK-MIPS-CXX: "-resource-dir" "foo" +// CHECK-MIPS-CXX: "-internal-isystem" "{{.*}}{{/|\\\\}}..{{/|\\\\}}mipsel-nacl{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}v1" +// CHECK-MIPS-CXX: "-internal-isystem" "foo{{/|\\\\}}include" +// CHECK-MIPS-CXX: "-internal-isystem" "{{.*}}{{/|\\\\}}..{{/|\\\\}}mipsel-nacl{{/|\\\\}}usr{{/|\\\\}}include" +// CHECK-MIPS-CXX: "-internal-isystem" "{{.*}}{{/|\\\\}}..{{/|\\\\}}mipsel-nacl{{/|\\\\}}include" +// CHECK-MIPS-CXX: "-lnacl" +// CHECK-MIPS-CXX: "-lpthread" |

