aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-build-force.cxx
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/mod-build-force.cxx
parent340cf0935a199240f6daaab8a347e22172f4d15b (diff)
Add target to build configuration id
Diffstat (limited to 'mod/mod-build-force.cxx')
-rw-r--r--mod/mod-build-force.cxx16
1 files changed, 14 insertions, 2 deletions
diff --git a/mod/mod-build-force.cxx b/mod/mod-build-force.cxx
index bd172e3..281c76c 100644
--- a/mod/mod-build-force.cxx
+++ b/mod/mod-build-force.cxx
@@ -120,6 +120,17 @@ handle (request& rq, response& rs)
if (config.empty ())
throw invalid_argument ("no configuration name");
+ target_triplet target;
+
+ try
+ {
+ target = target_triplet (params.target ());
+ }
+ catch (const invalid_argument& e)
+ {
+ throw invalid_argument (string ("invalid target: ") + e.what ());
+ }
+
string& toolchain_name (params.toolchain_name ());
if (toolchain_name.empty ())
@@ -130,6 +141,7 @@ handle (request& rq, response& rs)
id = build_id (package_id (move (tenant), move (p), package_version),
move (config),
+ move (target),
move (toolchain_name),
toolchain_version);
}
@@ -149,7 +161,7 @@ handle (request& rq, response& rs)
// Make sure the build configuration still exists.
//
- if (build_conf_map_->find (id.configuration.c_str ()) ==
+ if (build_conf_map_->find (build_config_id {id.configuration, id.target}) ==
build_conf_map_->end ())
config_expired ("no configuration");
@@ -177,7 +189,7 @@ handle (request& rq, response& rs)
l1 ([&]{trace << "force rebuild for "
<< b->tenant << ' '
<< b->package_name << '/' << b->package_version << ' '
- << b->configuration << ' '
+ << b->configuration << '/' << b->target << ' '
<< b->toolchain_name << '-' << b->toolchain_version
<< ": " << reason;});
}