From 6613fbc2a3fc96b491b6691145c72c5a9550dc84 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 25 Aug 2022 20:54:40 +0300 Subject: Add target to build configuration id --- mod/build-config-module.hxx | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'mod/build-config-module.hxx') 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 -#include // compare_c_string +#include #include @@ -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 build_conf_; - shared_ptr build_conf_names_; - shared_ptr> build_conf_map_; + shared_ptr> + build_conf_map_; // Map of build bot agent public keys fingerprints to the key file paths. // -- cgit v1.1