]> granicus.if.org Git - clang/commitdiff
[Driver] Default to -fno-addrsig on Android.
authorDan Albert <danalbert@google.com>
Tue, 8 Jan 2019 22:33:59 +0000 (22:33 +0000)
committerDan Albert <danalbert@google.com>
Tue, 8 Jan 2019 22:33:59 +0000 (22:33 +0000)
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350668 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains/Clang.cpp
test/Driver/addrsig.c

index 10487a6d450a7e31f1be001d1fcf737be67b74a1..7df95649bd1585607b42810c0ebb88a1e272bc0f 100644 (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");
 
index 556a908e30bd66e52e7d896bbdb0e707e5cc2ef7..684e351298dc9548ce07b1f154489fed36c28849 100644 (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