[Driver] Default to -fno-addrsig on Android.

Summary: The Android NDK still uses GNU binutils by default.

Reviewers: srhines, pirama

Reviewed By: srhines

Subscribers: cfe-commits

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

llvm-svn: 350668
This commit is contained in:
Dan Albert 2019-01-08 22:33:59 +00:00
parent d236b0aa93
commit dd14234b60
2 changed files with 2 additions and 0 deletions

View File

@ -5292,6 +5292,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
!TC.getTriple().isPS4() &&
!TC.getTriple().isOSNetBSD() &&
!Distro(D.getVFS()).IsGentoo() &&
!TC.getTriple().isAndroid() &&
TC.useIntegratedAs()))
CmdArgs.push_back("-faddrsig");

View File

@ -8,6 +8,7 @@
// RUN: %clang -### -target x86_64-unknown-linux -fno-addrsig -c %s 2>&1 | FileCheck -check-prefix=NO-ADDRSIG %s
// RUN: %clang -### -target x86_64-apple-darwin -c %s 2>&1 | FileCheck -check-prefix=NO-ADDRSIG %s
// RUN: %clang -### -target x86_64-scei-ps4 -c %s 2>&1 | FileCheck -check-prefix=NO-ADDRSIG %s
// RUN: %clang -### -target x86_64-linux-android21 -c %s 2>&1 | FileCheck -check-prefix=NO-ADDRSIG %s
// ADDRSIG: -faddrsig
// NO-ADDRSIG-NOT: -faddrsig