aboutsummaryrefslogtreecommitdiff
path: root/mod/build-config-module.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2022-08-25 20:54:40 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-08-29 17:18:19 +0300
commit6613fbc2a3fc96b491b6691145c72c5a9550dc84 (patch)
treebb1116efb5b475608458038240a4ba80e32b99af /mod/build-config-module.hxx
parent340cf0935a199240f6daaab8a347e22172f4d15b (diff)
Add target to build configuration id
Diffstat (limited to 'mod/build-config-module.hxx')
-rw-r--r--mod/build-config-module.hxx22
1 files changed, 12 insertions, 10 deletions
diff --git a/mod/build-config-module.hxx b/mod/build-config-module.hxx
index 51813c0..b276d6c 100644
--- a/mod/build-config-module.hxx
+++ b/mod/build-config-module.hxx
@@ -6,7 +6,7 @@
#include <map>
-#include <libbutl/utility.hxx> // compare_c_string
+#include <libbutl/target-triplet.hxx>
#include <libbpkg/manifest.hxx>
@@ -64,15 +64,16 @@ namespace brep
return belongs (cfg, cls.c_str ());
}
- // Configuration/toolchain combination that, in particular, can be used as
- // a set value.
+ // Configuration/target/toolchain combination that, in particular, can be
+ // used as a set value.
//
- // Note: contains shallow references to the configuration, toolchain name,
- // and version.
+ // Note: contains shallow references to the configuration, target,
+ // toolchain name, and version.
//
struct config_toolchain
{
const string& configuration;
+ const butl::target_triplet& target;
const string& toolchain_name;
const bpkg::version& toolchain_version;
@@ -85,7 +86,10 @@ namespace brep
if (toolchain_version != ct.toolchain_version)
return toolchain_version > ct.toolchain_version;
- return configuration.compare (ct.configuration) < 0;
+ if (int r = configuration.compare (ct.configuration))
+ return r < 0;
+
+ return target.compare (ct.target) < 0;
}
};
@@ -93,11 +97,9 @@ namespace brep
// Build configurations.
//
shared_ptr<const bbot::build_configs> build_conf_;
- shared_ptr<const cstrings> build_conf_names_;
- shared_ptr<const std::map<const char*,
- const bbot::build_config*,
- butl::compare_c_string>> build_conf_map_;
+ shared_ptr<const std::map<build_config_id, const bbot::build_config*>>
+ build_conf_map_;
// Map of build bot agent public keys fingerprints to the key file paths.
//