From 43a748b89ce120b9f837f8a49c613680011653b3 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 10 Oct 2014 14:12:50 +0300 Subject: [PATCH] Add some logging to AndroidTools --- source/androidtools.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/androidtools.cpp b/source/androidtools.cpp index 1042595..13ebc25 100644 --- a/source/androidtools.cpp +++ b/source/androidtools.cpp @@ -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 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 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 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 platform_archs = list_filtered(platform_archs_dir, "^arch-"); for(list::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())); } -- 2.45.2