X-Git-Url: http://git.tdb.fi/?p=builder.git;a=blobdiff_plain;f=source%2Fandroidcompiler.cpp;h=53f4de1947b11223138d38930be8180d506cc28f;hp=490c198196c9764af402a91235b782d258eb12af;hb=a5fd0f039fa3d067d641595e4043dd5e8e3c0820;hpb=2d9a6cf1b0123e5962d5558b57f74c1faf33bf0b diff --git a/source/androidcompiler.cpp b/source/androidcompiler.cpp index 490c198..53f4de1 100644 --- a/source/androidcompiler.cpp +++ b/source/androidcompiler.cpp @@ -1,9 +1,13 @@ #include #include +#include #include +#include #include "androidcompiler.h" #include "androidtools.h" #include "builder.h" +#include "externaltask.h" +#include "filetarget.h" using namespace std; using namespace Msp; @@ -23,6 +27,20 @@ void AndroidCompiler::do_prepare() GnuCompiler::do_prepare(); if(executable && tag=="CXX") { + ExternalTask::Arguments argv; + argv.push_back(executable->get_path().str()); + argv.push_back("-dumpversion"); + + builder.get_logger().log("auxcommands", format("Running %s", join(argv.begin(), argv.end()))); + string version; + try + { + version = strip(ExternalTask::run_and_capture_output(argv)); + builder.get_logger().log("tools", format("%s version is %s", FS::basename(executable->get_path()), version)); + } + catch(const runtime_error &) + { } + FS::Path libstdcxx_path = ndk.get_root_dir()/"sources"/"cxx-stl"/"gnu-libstdc++"/version; FS::Path public_dir = libstdcxx_path/"include";