Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable -pie and --enable-new-dtags by default on Android.
Summary: Also enable -no-pie on Gnu toolchain (previously available on Darwin only). Non-PIE executables won't even start on recent Android, and DT_RPATH is ignored by the loader. Reviewers: srhines, danalbert Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D38430 llvm-svn: 316606
- Loading branch information
Showing
8 changed files
with
134 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// NO-PIE-NOT: "-pie" | ||
// PIE: "-pie" | ||
|
||
// RUN: %clang %s -### -o %t.o 2>&1 --target=arm-linux-androideabi \ | ||
// RUN: | FileCheck --check-prefix=NO-PIE %s | ||
// RUN: %clang %s -### -o %t.o 2>&1 --target=arm-linux-android \ | ||
// RUN: | FileCheck --check-prefix=NO-PIE %s | ||
// RUN: %clang %s -### -o %t.o 2>&1 --target=arm-linux-android14 \ | ||
// RUN: | FileCheck --check-prefix=NO-PIE %s | ||
// RUN: %clang %s -### -o %t.o 2>&1 --target=arm-linux-android16 \ | ||
// RUN: | FileCheck --check-prefix=PIE %s | ||
// RUN: %clang %s -### -o %t.o 2>&1 --target=arm-linux-android24 \ | ||
// RUN: | FileCheck --check-prefix=PIE %s | ||
|
||
// RUN: %clang %s -### -o %t.o 2>&1 --target=mipsel-linux-android \ | ||
// RUN: | FileCheck --check-prefix=NO-PIE %s | ||
// RUN: %clang %s -### -o %t.o 2>&1 --target=mipsel-linux-android14 \ | ||
// RUN: | FileCheck --check-prefix=NO-PIE %s | ||
// RUN: %clang %s -### -o %t.o 2>&1 --target=mipsel-linux-android16 \ | ||
// RUN: | FileCheck --check-prefix=PIE %s | ||
// RUN: %clang %s -### -o %t.o 2>&1 --target=mipsel-linux-android24 \ | ||
// RUN: | FileCheck --check-prefix=PIE %s | ||
|
||
// RUN: %clang %s -### -o %t.o 2>&1 --target=i686-linux-android \ | ||
// RUN: | FileCheck --check-prefix=NO-PIE %s | ||
// RUN: %clang %s -### -o %t.o 2>&1 --target=i686-linux-android14 \ | ||
// RUN: | FileCheck --check-prefix=NO-PIE %s | ||
// RUN: %clang %s -### -o %t.o 2>&1 --target=i686-linux-android16 \ | ||
// RUN: | FileCheck --check-prefix=PIE %s | ||
// RUN: %clang %s -### -o %t.o 2>&1 --target=i686-linux-android24 \ | ||
// RUN: | FileCheck --check-prefix=PIE %s | ||
|
||
// RUN: %clang %s -### -o %t.o 2>&1 --target=aarch64-linux-android \ | ||
// RUN: | FileCheck --check-prefix=PIE %s | ||
// RUN: %clang %s -### -o %t.o 2>&1 --target=aarch64-linux-android24 \ | ||
// RUN: | FileCheck --check-prefix=PIE %s | ||
|
||
// RUN: %clang %s -### -o %t.o 2>&1 --target=arm64-linux-android \ | ||
// RUN: | FileCheck --check-prefix=PIE %s | ||
// RUN: %clang %s -### -o %t.o 2>&1 --target=arm64-linux-android24 \ | ||
// RUN: | FileCheck --check-prefix=PIE %s | ||
|
||
// RUN: %clang %s -### -o %t.o 2>&1 --target=mips64el-linux-android \ | ||
// RUN: | FileCheck --check-prefix=PIE %s | ||
// RUN: %clang %s -### -o %t.o 2>&1 --target=mips64el-linux-android24 \ | ||
// RUN: | FileCheck --check-prefix=PIE %s | ||
|
||
// RUN: %clang %s -### -o %t.o 2>&1 --target=x86_64-linux-android \ | ||
// RUN: | FileCheck --check-prefix=PIE %s | ||
// RUN: %clang %s -### -o %t.o 2>&1 --target=x86_64-linux-android24 \ | ||
// RUN: | FileCheck --check-prefix=PIE %s | ||
|
||
// Override toolchain default setting. | ||
// RUN: %clang %s -### -o %t.o 2>&1 -pie --target=arm-linux-androideabi \ | ||
// RUN: | FileCheck --check-prefix=PIE %s | ||
// RUN: %clang %s -### -o %t.o 2>&1 -pie --target=arm-linux-androideabi14 \ | ||
// RUN: | FileCheck --check-prefix=PIE %s | ||
// RUN: %clang %s -### -o %t.o 2>&1 -no-pie -pie --target=arm-linux-androideabi24 \ | ||
// RUN: | FileCheck --check-prefix=PIE %s | ||
|
||
// RUN: %clang %s -### -o %t.o 2>&1 -no-pie --target=arm-linux-androideabi24 \ | ||
// RUN: | FileCheck --check-prefix=NO-PIE %s | ||
// RUN: %clang %s -### -o %t.o 2>&1 -nopie --target=arm-linux-androideabi24 \ | ||
// RUN: | FileCheck --check-prefix=NO-PIE %s | ||
// RUN: %clang %s -### -o %t.o 2>&1 -pie -no-pie --target=arm-linux-androideabi24 \ | ||
// RUN: | FileCheck --check-prefix=NO-PIE %s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters