Commit Graph

3 Commits

Author SHA1 Message Date
Fangrui Song a77d1f68a0 [Driver] Change Linux::isPIEDefault to true for all Android versions
Currently any API level>=16 uses default PIE.
If API level<16 is too old to be supported, we can clean up some code.

Reviewed By: danalbert

Differential Revision: https://reviews.llvm.org/D113370
2021-11-11 00:12:07 -08:00
Evgeniy Stepanov d48c0cd910 Don't use -pie in relocatable link.
Summary:
Android, in particular, got PIE enabled by default in r316606. It resulted in
relocatable links passing both -r and -pie to the linker, which is not allowed.

Reviewers: srhines

Subscribers: cfe-commits

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

llvm-svn: 327165
2018-03-09 19:35:16 +00:00
Evgeniy Stepanov 117627c9a1 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
2017-10-25 20:39:22 +00:00