diff options
author | Dan Albert <danalbert@google.com> | 2018-10-11 20:39:32 +0000 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2018-10-11 20:39:32 +0000 |
commit | 99ac6c8e89d94fc6bbdf3cb11f718f97b213b09f (patch) | |
tree | 1dfd99be77245dfbafac8621b74fd80729af8d6c /clang/test | |
parent | cf41adaaa0bb0b4a156a1ce16012406d5cdc7991 (diff) | |
download | bcm5719-llvm-99ac6c8e89d94fc6bbdf3cb11f718f97b213b09f.tar.gz bcm5719-llvm-99ac6c8e89d94fc6bbdf3cb11f718f97b213b09f.zip |
[Driver] Fix --hash-style choice for Android.
Summary:
Android supports GNU style hashes as of Marshmallow, so we should be
generating both styles for pre-M targets and GNU hashes for newer
targets.
Reviewers: srhines, pirama
Reviewed By: srhines
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D53118
llvm-svn: 344293
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/Driver/linux-ld.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/Driver/linux-ld.c b/clang/test/Driver/linux-ld.c index 030753cb2b1..cb530216fe6 100644 --- a/clang/test/Driver/linux-ld.c +++ b/clang/test/Driver/linux-ld.c @@ -975,6 +975,20 @@ // CHECK-MIPS64EL-REDHAT: "-dynamic-linker" "{{.*}}/lib{{(64)?}}/ld.so.1" // CHECK-MIPS64EL-REDHAT-NOT: "-dynamic-linker" "{{.*}}/lib{{(64)?}}/ld-musl-mipsel.so.1" // CHECK-MIPS64EL-REDHAT-NOT: "--hash-style={{gnu|both}}" + +// Check that we pass --hash-style=both for pre-M Android versions and +// --hash-style=gnu for newer Android versions. +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=armv7-linux-android21 \ +// RUN: | FileCheck --check-prefix=CHECK-ANDROID-HASH-STYLE-L %s +// CHECK-ANDROID-HASH-STYLE-L: "{{.*}}ld{{(.exe)?}}" +// CHECK-ANDROID-HASH-STYLE-L: "--hash-style=both" +// +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=armv7-linux-android23 \ +// RUN: | FileCheck --check-prefix=CHECK-ANDROID-HASH-STYLE-M %s +// CHECK-ANDROID-HASH-STYLE-M: "{{.*}}ld{{(.exe)?}}" +// CHECK-ANDROID-HASH-STYLE-M: "--hash-style=gnu" // // RUN: %clang %s -### -o %t.o 2>&1 \ // RUN: --target=sparc-unknown-linux-gnu \ |