1 #include <msp/fs/dir.h>
2 #include <msp/strings/format.h>
3 #include "androidcxxcompiler.h"
4 #include "androidtools.h"
5 #include "architecture.h"
11 AndroidCxxCompiler::AndroidCxxCompiler(Builder &b, const Architecture &a, const AndroidNdk &n):
12 GnuCxxCompiler(b, a, n.get_platform_sysroot()),
15 set_command((ndk.get_bin_dir()/command).str());
16 build_info.incpath.insert(build_info.incpath.end(), system_path.begin(), system_path.end());
17 build_info.libs.push_back("gnustl_static");
20 void AndroidCxxCompiler::do_prepare()
22 GnuCxxCompiler::do_prepare();
25 FS::Path libstdcxx_path = ndk.get_root_dir()/"sources"/"cxx-stl"/"gnu-libstdc++"/version;
27 FS::Path public_dir = libstdcxx_path/"include";
28 system_path.push_back(public_dir);
29 build_info.incpath.push_back(public_dir);
31 FS::Path arch_path = libstdcxx_path/"libs";
32 builder.get_logger().log("files", format("Traversing %s", arch_path.str()));
33 string arch_dir = architecture->best_match(list_files(arch_path));
36 build_info.incpath.push_back(libstdcxx_path/"libs"/arch_dir/"include");
37 build_info.libpath.push_back(libstdcxx_path/"libs"/arch_dir);