diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2023-01-12 15:49:16 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2023-01-12 15:59:22 +0100 |
commit | c093758b4688fb5bae2cc7727b6c9b52b824043e (patch) | |
tree | f92c206b0fa6366319e17f1c7f375dfeb0ab5f27 /src/task_cc.cc | |
parent | cc4e14d243f4e7e1ad487d8865c5ffc8423e473d (diff) |
Move tools opt to ctor.h and rename tool_chain to toolchain for consistency.
Diffstat (limited to 'src/task_cc.cc')
-rw-r--r-- | src/task_cc.cc | 15 |
1 files changed, 7 insertions, 8 deletions
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<std::string> TaskCC::getCompilerArgs() const { - auto tool_chain = getToolChain(config.system); - + auto toolchain = getToolChain(config.system); auto compiler_flags = flags(); std::vector<std::string> 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<std::string> 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; |