From: Mikko Rasa Date: Tue, 27 Dec 2022 16:12:49 +0000 (+0200) Subject: Initialize AndroidCompiler's build info in do_prepare X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=b29b79ca42fe4285c18b5d348b4eb59010d2c2da;p=builder.git Initialize AndroidCompiler's build info in do_prepare --- diff --git a/source/androidcompiler.cpp b/source/androidcompiler.cpp index 0704793..2321f03 100644 --- a/source/androidcompiler.cpp +++ b/source/androidcompiler.cpp @@ -35,9 +35,6 @@ AndroidCompiler::AndroidCompiler(Builder &b, const Architecture &a, const string } else build_info.sysroot = ndk.get_platform_sysroot(); - - if(tag=="CXX") - build_info.libs.push_back("gnustl_static"); } void AndroidCompiler::do_prepare(ToolData &tool) const @@ -47,6 +44,8 @@ void AndroidCompiler::do_prepare(ToolData &tool) const CustomizedTool::do_prepare(tool); if(tag=="CXX") { + tool.build_info.libs.push_back("gnustl_static"); + unsigned version = tool.extra_data; string version_str = format("%d.%d.%d", version>>16, (version>>8)&0xFF, version&0xFF); FS::Path libstdcxx_dir = ndk.get_root_dir()/"sources"/"cxx-stl"/"gnu-libstdc++"; @@ -67,6 +66,8 @@ void AndroidCompiler::do_prepare(ToolData &tool) const version_str = version_str.substr(0, dot); } + builder.get_logger().log("tools", "Found GNU libstdc++ in %s", libstdcxx_path); + FS::Path public_dir = libstdcxx_path/"include"; tool.system_path.push_back(public_dir); tool.build_info.incpath.push_back(public_dir);