void AndroidNdk::find_toolchain_dir()
{
FS::Path toolchains_dir = ndk_root/"toolchains";
+ builder.get_logger().log("files", format("Traversing %s", toolchains_dir.str()));
list<string> toolchains = list_files(toolchains_dir);
string prefix = architecture.get_cross_prefix()+"-";
const Architecture &native_arch = builder.get_native_arch();
FS::Path tc_archs_dir = toolchains_dir/use_toolchain/"prebuilt";
+ builder.get_logger().log("files", format("Traversing %s", tc_archs_dir.str()));
string use_arch = native_arch.best_match(list_files(tc_archs_dir));
if(use_arch.empty())
throw runtime_error("No matching toolchain found");
bin_dir = toolchains_dir/use_toolchain/"prebuilt"/use_arch/"bin";
+ builder.get_logger().log("tools", format("Android toolchain binaries are in %s", bin_dir.str()));
}
void AndroidNdk::find_platform_dir()
{
FS::Path platforms_dir = ndk_root/"platforms";
+ builder.get_logger().log("files", format("Traversing %s", platforms_dir.str()));
list<string> platforms = list_files(platforms_dir);
string use_platform;
if(use_platform.empty())
throw runtime_error("No applicable platforms found");
- list<string> platform_archs = list_filtered(platforms_dir/use_platform, "^arch-");
+ FS::Path platform_archs_dir = platforms_dir/use_platform;
+ builder.get_logger().log("files", format("Traversing %s", platform_archs_dir.str()));
+ list<string> platform_archs = list_filtered(platform_archs_dir, "^arch-");
for(list<string>::iterator i=platform_archs.begin(); i!=platform_archs.end(); ++i)
i->erase(0, 5);
string use_arch = architecture.best_match(platform_archs);
throw runtime_error("No matching platform found");
platform_sysroot = platforms_dir/use_platform/use_arch;
+ builder.get_logger().log("tools", format("Android platform sysroot is %s", platform_sysroot.str()));
}