You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.4 KiB
40 lines
1.4 KiB
--- ./tools/clang/lib/Driver/ToolChains/Linux.cpp.orig 2019-02-16 23:00:22.943658132 +0000
|
|
+++ ./tools/clang/lib/Driver/ToolChains/Linux.cpp 2019-02-16 23:15:04.826482282 +0000
|
|
@@ -652,8 +652,27 @@
|
|
return;
|
|
|
|
if (!DriverArgs.hasArg(options::OPT_nostdlibinc))
|
|
+ if (getTriple().isAndroid()) {
|
|
+ switch (getTriple().getArch()) {
|
|
+ case llvm::Triple::x86_64:
|
|
+ addSystemInclude(DriverArgs, CC1Args, SysRoot + "@TERMUX_PREFIX@/include/x86_64-linux-android");
|
|
+ break;
|
|
+ case llvm::Triple::x86:
|
|
+ addSystemInclude(DriverArgs, CC1Args, SysRoot + "@TERMUX_PREFIX@/include/i686-linux-android");
|
|
+ break;
|
|
+ case llvm::Triple::aarch64:
|
|
+ addSystemInclude(DriverArgs, CC1Args, SysRoot + "@TERMUX_PREFIX@/include/aarch64-linux-android");
|
|
+ break;
|
|
+ case llvm::Triple::arm:
|
|
+ case llvm::Triple::thumb:
|
|
+ addSystemInclude(DriverArgs, CC1Args, SysRoot + "@TERMUX_PREFIX@/include/arm-linux-androideabi");
|
|
+ break;
|
|
+ default:
|
|
+ break;
|
|
+ }
|
|
+
|
|
addSystemInclude(DriverArgs, CC1Args, SysRoot + "/usr/local/include");
|
|
-
|
|
+ }
|
|
if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) {
|
|
SmallString<128> P(D.ResourceDir);
|
|
llvm::sys::path::append(P, "include");
|
|
@@ -968,7 +987,7 @@
|
|
}
|
|
|
|
bool Linux::isPIEDefault() const {
|
|
- return (getTriple().isAndroid() && !getTriple().isAndroidVersionLT(16)) ||
|
|
+ return getTriple().isAndroid() ||
|
|
getTriple().isMusl() || getSanitizerArgs().requiresPIE();
|
|
}
|
|
|
|
|