X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fandroidcompiler.cpp;h=cdd98af34f5095dd853521535091e5b37e0fc4e8;hb=d774d554c4c15b963215212b26a9ee5df3d705e8;hp=01daa2a65c6ea2318bcf0a6f79366945e2309575;hpb=266697cea92aed098fff31c1ddd4a4bfab3a683f;p=builder.git diff --git a/source/androidcompiler.cpp b/source/androidcompiler.cpp index 01daa2a..cdd98af 100644 --- a/source/androidcompiler.cpp +++ b/source/androidcompiler.cpp @@ -13,7 +13,7 @@ using namespace std; using namespace Msp; AndroidCompiler::AndroidCompiler(Builder &b, const Architecture &a, const string &t, const AndroidNdk &n): - GnuCompiler(b, a, t, n.get_platform_sysroot()), + GnuCompiler(b, a, t), ndk(n) { if(ndk.get_root_dir().empty()) @@ -25,8 +25,16 @@ AndroidCompiler::AndroidCompiler(Builder &b, const Architecture &a, const string if(ndk.get_platform_sysroot().empty()) problems.push_back("Android platform not found"); + else if(!ndk.get_common_sysroot().empty()) + { + build_info.sysroot = ndk.get_common_sysroot(); + /* The common sysroot has asm headers in arch directories and the + compiler doesn't pick them up automatically */ + build_info.incpath.push_back(ndk.get_common_sysroot()/"usr/include"/architecture->get_cross_prefix()); + } + else + build_info.sysroot = ndk.get_platform_sysroot(); - build_info.incpath.insert(build_info.incpath.end(), system_path.begin(), system_path.end()); if(tag=="CXX") build_info.libs.push_back("gnustl_static"); }