]> git.tdb.fi Git - builder.git/blobdiff - source/androidcompiler.cpp
Recognize and use the common sysroot in newer Android NDKs
[builder.git] / source / androidcompiler.cpp
index e45715e5a7313068ff66663406473f1e52608565..cdd98af34f5095dd853521535091e5b37e0fc4e8 100644 (file)
@@ -25,6 +25,13 @@ 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();