From: Mikko Rasa Date: Thu, 29 Dec 2022 16:33:58 +0000 (+0200) Subject: Replace the stdc++ library with gnustl_static on Android X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=bfbae0aed8eef842b39794b910f0502b4947dce0;p=builder.git Replace the stdc++ library with gnustl_static on Android --- diff --git a/plugins/android/androidcompiler.cpp b/plugins/android/androidcompiler.cpp index b9d7add..e1babc6 100644 --- a/plugins/android/androidcompiler.cpp +++ b/plugins/android/androidcompiler.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -44,7 +45,11 @@ void AndroidCompiler::do_prepare(ToolData &tool) const CustomizedTool::do_prepare(tool); if(tag=="CXX") { - tool.build_info.libs.push_back("gnustl_static"); + auto i = find(tool.build_info.libs, "stdc++"); + if(i!=tool.build_info.libs.end()) + *i = "gnustl_static"; + else + 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);