From: Mikko Rasa Date: Mon, 26 Dec 2022 12:20:51 +0000 (+0200) Subject: Use CustomizedTool for tools which derive from other tools X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=494022085666b79b4ca5ebf17d6b9acc7db11b25;p=builder.git Use CustomizedTool for tools which derive from other tools --- diff --git a/source/androidarchiver.cpp b/source/androidarchiver.cpp index 58cbefa..5b869de 100644 --- a/source/androidarchiver.cpp +++ b/source/androidarchiver.cpp @@ -2,7 +2,7 @@ #include "androidtools.h" AndroidArchiver::AndroidArchiver(Builder &b, const Architecture &a, const AndroidNdk &ndk): - GnuArchiver(b, a) + CustomizedTool(b, "AR", a) { if(ndk.get_root_dir().empty()) problems.push_back("Android NDK not found"); diff --git a/source/androidarchiver.h b/source/androidarchiver.h index e09ccec..a39fe54 100644 --- a/source/androidarchiver.h +++ b/source/androidarchiver.h @@ -1,11 +1,11 @@ #ifndef ANDROIDARCHIVER_H_ #define ANDROIDARCHIVER_H_ -#include "gnuarchiver.h" +#include "customizedtool.h" class AndroidNdk; -class AndroidArchiver: public GnuArchiver +class AndroidArchiver: public CustomizedTool { public: AndroidArchiver(Builder &, const Architecture &, const AndroidNdk &); diff --git a/source/androidcompiler.cpp b/source/androidcompiler.cpp index db089b2..139d743 100644 --- a/source/androidcompiler.cpp +++ b/source/androidcompiler.cpp @@ -13,7 +13,7 @@ using namespace std; using namespace Msp; AndroidCompiler::AndroidCompiler(Builder &b, const Architecture &a, const string &t, const AndroidNdk &n): - GnuCompiler(b, &a, t), + CustomizedTool(b, t, a), ndk(n) { if(ndk.get_root_dir().empty()) @@ -43,7 +43,7 @@ void AndroidCompiler::do_prepare(ToolData &tool) const { const Architecture &arch = *static_cast(tool).get_architecture(); - GnuCompiler::do_prepare(tool); + CustomizedTool::do_prepare(tool); if(tag=="CXX") { unsigned version = tool.extra_data; diff --git a/source/androidcompiler.h b/source/androidcompiler.h index 9f42099..86dfa27 100644 --- a/source/androidcompiler.h +++ b/source/androidcompiler.h @@ -1,11 +1,11 @@ #ifndef ANDROIDCOMPILER_H_ #define ANDROIDCOMPILER_H_ -#include "gnucompiler.h" +#include "customizedtool.h" class AndroidNdk; -class AndroidCompiler: public GnuCompiler +class AndroidCompiler: public CustomizedTool { private: const AndroidNdk &ndk; diff --git a/source/androidlinker.cpp b/source/androidlinker.cpp index 2cacf38..9629bb7 100644 --- a/source/androidlinker.cpp +++ b/source/androidlinker.cpp @@ -4,12 +4,12 @@ using namespace std; AndroidLinker::AndroidLinker(Builder &b, const Architecture &a, const AndroidNdk &ndk): - GnuLinker(b, a) + CustomizedTool(b, "LINK", a) { build_info.sysroot = ndk.get_platform_sysroot(); } Target *AndroidLinker::create_target(const vector &sources, const string &) { - return GnuLinker::create_target(sources, "shared"); + return CustomizedTool::create_target(sources, "shared"); } diff --git a/source/androidlinker.h b/source/androidlinker.h index 269d168..7418d3c 100644 --- a/source/androidlinker.h +++ b/source/androidlinker.h @@ -1,11 +1,11 @@ #ifndef ANDROIDLINKER_H_ #define ANDROIDLINKER_H_ -#include "gnulinker.h" +#include "customizedtool.h" class AndroidNdk; -class AndroidLinker: public GnuLinker +class AndroidLinker: public CustomizedTool { public: AndroidLinker(Builder &, const Architecture &, const AndroidNdk &); diff --git a/source/clangcompiler.cpp b/source/clangcompiler.cpp index f0ab939..bcd73d1 100644 --- a/source/clangcompiler.cpp +++ b/source/clangcompiler.cpp @@ -4,7 +4,7 @@ using namespace std; using namespace Msp; ClangCompiler::ClangCompiler(Builder &b, const Architecture &a, const string &t): - GnuCompiler(b, a, t) + CustomizedTool(b, t, a) { set_command((tag=="CXX" ? "clang++" : "clang"), true); } diff --git a/source/clangcompiler.h b/source/clangcompiler.h index 656b9d2..af2c05d 100644 --- a/source/clangcompiler.h +++ b/source/clangcompiler.h @@ -1,9 +1,9 @@ #ifndef CLANGCOMPILER_H_ #define CLANGCOMPILER_H_ -#include "gnucompiler.h" +#include "customizedtool.h" -class ClangCompiler: public GnuCompiler +class ClangCompiler: public CustomizedTool { public: ClangCompiler(Builder &, const Architecture &, const std::string &);