]> git.tdb.fi Git - builder.git/commitdiff
Add some logging to AndroidTools
authorMikko Rasa <tdb@tdb.fi>
Fri, 10 Oct 2014 11:12:50 +0000 (14:12 +0300)
committerMikko Rasa <tdb@tdb.fi>
Fri, 10 Oct 2014 13:00:13 +0000 (16:00 +0300)
source/androidtools.cpp

index 1042595fd9423802006136791e0ab9cf0587f40a..13ebc2530556413b97afd0fc57ab31ccc35eacd8 100644 (file)
@@ -37,6 +37,7 @@ AndroidNdk::AndroidNdk(Builder &b, const Architecture &a):
 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()+"-";
@@ -76,17 +77,20 @@ void AndroidNdk::find_toolchain_dir()
        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;
@@ -105,7 +109,9 @@ void AndroidNdk::find_platform_dir()
        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);
@@ -114,4 +120,5 @@ void AndroidNdk::find_platform_dir()
                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()));
 }