danalbert added inline comments.
================ Comment at: cfe/trunk/lib/Driver/ToolChains/Linux.cpp:814 +bool Linux::isPIEDefault() const { + return (getTriple().isAndroid() && !getTriple().isAndroidVersionLT(16)) || + getSanitizerArgs().requiresPIE(); ---------------- pcc wrote: > eugenis wrote: > > pcc wrote: > > > Why only on API level >= 16? If I create an executable targeting an older > > > API level, it should still work on higher API levels. > > Because it needs to work on lower API levels, too. I think at some point > > PIE was actually not supported, so there is no good default that works for > > everyone. > I see. Looking at the tags in which > https://github.com/aosp-mirror/platform_bionic/commit/d9ad62343c2db6b66a5fa597c9b20a6faabd7a9a > was present, support was indeed added in Jelly Bean, which was API level 16. > So this is correct. Correct. Supported as of 16, required as of 21. The NDK itself doesn't actually support pre-16 any more, but probably best for Clang to do the right thing anyway in case some user is trying to maintain their own sysroot for ICS that uses a modern Clang. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D38430/new/ https://reviews.llvm.org/D38430 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits