]> git.tdb.fi Git - builder.git/commitdiff
Initialize AndroidCompiler's build info in do_prepare
authorMikko Rasa <tdb@tdb.fi>
Tue, 27 Dec 2022 16:12:49 +0000 (18:12 +0200)
committerMikko Rasa <tdb@tdb.fi>
Tue, 27 Dec 2022 16:31:00 +0000 (18:31 +0200)
source/androidcompiler.cpp

index 07047937f41a1010d009349f8b46c2ccd6604051..2321f033c0844504d8005f087d42428ee8cb0c15 100644 (file)
@@ -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);