From c093758b4688fb5bae2cc7727b6c9b52b824043e Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 12 Jan 2023 15:49:16 +0100 Subject: Move tools opt to ctor.h and rename tool_chain to toolchain for consistency. --- src/task_cc.cc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/task_cc.cc') diff --git a/src/task_cc.cc b/src/task_cc.cc index 7f69998..c15bd6a 100644 --- a/src/task_cc.cc +++ b/src/task_cc.cc @@ -281,22 +281,21 @@ std::string TaskCC::flagsString() const std::vector TaskCC::getCompilerArgs() const { - auto tool_chain = getToolChain(config.system); - + auto toolchain = getToolChain(config.system); auto compiler_flags = flags(); std::vector args; - append(args, getOption(tool_chain, opt::generate_dep_tree)); + append(args, getOption(toolchain, ctor::opt::generate_dep_tree)); if(std::filesystem::path(config.target).extension() == ".so") { // Add -fPIC arg to all contained object files - append(args, getOption(tool_chain, opt::position_independent_code)); + append(args, getOption(toolchain, ctor::opt::position_independent_code)); } - append(args, getOption(tool_chain, opt::no_link)); + append(args, getOption(toolchain, ctor::opt::no_link)); args.push_back(sourceFile.string()); - append(args, getOption(tool_chain, opt::output, targetFile().string())); + append(args, getOption(toolchain, ctor::opt::output, targetFile().string())); for(const auto& flag : compiler_flags) { @@ -304,13 +303,13 @@ std::vector TaskCC::getCompilerArgs() const switch(option.first) { // Relative include paths has to be altered to be relative to sourceDir - case opt::include_path: + case ctor::opt::include_path: { std::filesystem::path path(option.second); if(path.is_relative()) { path = (sourceDir / path).lexically_normal(); - append(args, getOption(tool_chain, opt::include_path, path.string())); + append(args, getOption(toolchain, ctor::opt::include_path, path.string())); } } continue; -- cgit v1.2.3