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();
AndroidDevKit(b, "NDK"),
architecture(a)
{
+ if(!root.empty())
+ {
+ FS::Path csr = root/"sysroot";
+ if(FS::exists(csr))
+ {
+ common_sysroot = csr;
+ builder.get_logger().log("tools", format("Android NDK common sysroot is %s", common_sysroot));
+ }
+ }
+
find_toolchain_dir();
}
}
platform_sysroot = platform_archs_dir/("arch-"+use_arch);
- builder.get_logger().log("tools", format("Android NDK sysroot is %s", platform_sysroot.str()));
+ builder.get_logger().log("tools", format("Android NDK platform sysroot is %s", platform_sysroot));
}
private:
const Architecture &architecture;
Msp::FS::Path bin_dir;
+ Msp::FS::Path common_sysroot;
Msp::FS::Path platform_sysroot;
public:
public:
const Msp::FS::Path &get_bin_dir() const { return bin_dir; }
+ const Msp::FS::Path &get_common_sysroot() const { return common_sysroot; }
const Msp::FS::Path &get_platform_sysroot() const { return platform_sysroot; }
};