From: Mikko Rasa Date: Sat, 24 Dec 2022 16:26:52 +0000 (+0200) Subject: Change Tool's protected constructor to take a pointer to Architecture X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=7780df0b9a760327a9ad9ff80fc6b5d9a273db96;p=builder.git Change Tool's protected constructor to take a pointer to Architecture --- diff --git a/source/androidcompiler.cpp b/source/androidcompiler.cpp index 9ae31ac..63fd527 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), + GnuCompiler(b, &a, t), ndk(n) { if(ndk.get_root_dir().empty()) diff --git a/source/gnuarchiver.cpp b/source/gnuarchiver.cpp index 2f5ba24..629cb70 100644 --- a/source/gnuarchiver.cpp +++ b/source/gnuarchiver.cpp @@ -14,7 +14,7 @@ using namespace std; using namespace Msp; GnuArchiver::GnuArchiver(Builder &b, const Architecture &a): - Tool(b, a, "AR") + Tool(b, &a, "AR") { set_command("ar", true); input_suffixes.push_back(".o"); diff --git a/source/gnucompiler.cpp b/source/gnucompiler.cpp index 086a1ed..91d5a17 100644 --- a/source/gnucompiler.cpp +++ b/source/gnucompiler.cpp @@ -28,7 +28,7 @@ const char *cpus[] = } GnuCompiler::GnuCompiler(Builder &b, const Architecture &a, const string &t): - Tool(b, a, t), + Tool(b, &a, t), version(0) { if(tag=="CC") diff --git a/source/gnulinker.cpp b/source/gnulinker.cpp index 619c9e7..2416449 100644 --- a/source/gnulinker.cpp +++ b/source/gnulinker.cpp @@ -22,7 +22,7 @@ using namespace std; using namespace Msp; GnuLinker::GnuLinker(Builder &b, const Architecture &a): - Tool(b, a, "LINK") + Tool(b, &a, "LINK") { input_suffixes.push_back(".o"); input_suffixes.push_back(".a"); diff --git a/source/mingwdlltool.cpp b/source/mingwdlltool.cpp index 62ef705..c6eddc0 100644 --- a/source/mingwdlltool.cpp +++ b/source/mingwdlltool.cpp @@ -16,7 +16,7 @@ using namespace std; using namespace Msp; MingwDllTool::MingwDllTool(Builder &b, const Architecture &a): - Tool(b, a, "DLL") + Tool(b, &a, "DLL") { set_command("dlltool", true); set_run(_run); diff --git a/source/msvcarchiver.cpp b/source/msvcarchiver.cpp index 2d5d842..26fbc1d 100644 --- a/source/msvcarchiver.cpp +++ b/source/msvcarchiver.cpp @@ -11,7 +11,7 @@ using namespace std; using namespace Msp; MsvcArchiver::MsvcArchiver(Builder &b, const Architecture &a, const MicrosoftTools &m): - Tool(b, a, "AR"), + Tool(b, &a, "AR"), ms_tools(m) { input_suffixes.push_back(".o"); diff --git a/source/msvccompiler.cpp b/source/msvccompiler.cpp index 099c123..c3361ee 100644 --- a/source/msvccompiler.cpp +++ b/source/msvccompiler.cpp @@ -16,7 +16,7 @@ using namespace std; using namespace Msp; MsvcCompiler::MsvcCompiler(Builder &b, const Architecture &a, const string &t, const MicrosoftTools &m): - Tool(b, a, t), + Tool(b, &a, t), ms_tools(m) { if(tag=="CC") diff --git a/source/msvclinker.cpp b/source/msvclinker.cpp index 62e9d2a..f802ef6 100644 --- a/source/msvclinker.cpp +++ b/source/msvclinker.cpp @@ -17,7 +17,7 @@ using namespace std; using namespace Msp; MsvcLinker::MsvcLinker(Builder &b, const Architecture &a, const MicrosoftTools &m): - Tool(b, a, "LINK"), + Tool(b, &a, "LINK"), ms_tools(m) { input_suffixes.push_back(".o"); diff --git a/source/tool.h b/source/tool.h index ca19c6f..5ea6335 100644 --- a/source/tool.h +++ b/source/tool.h @@ -46,8 +46,6 @@ protected: std::vector problems; Tool(Builder &b, const std::string &t): Tool(b, 0, t) { } - Tool(Builder &b, const Architecture &a, const std::string &t): Tool(b, &a, t) { } -private: Tool(Builder &b, const Architecture *a, const std::string &t): builder(b), architecture(a), tag(t) { } public: virtual ~Tool() { }