aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/common.txx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/cc/common.txx')
-rw-r--r--libbuild2/cc/common.txx4
1 files changed, 3 insertions, 1 deletions
diff --git a/libbuild2/cc/common.txx b/libbuild2/cc/common.txx
index d14f966..f55072c 100644
--- a/libbuild2/cc/common.txx
+++ b/libbuild2/cc/common.txx
@@ -27,7 +27,9 @@ namespace build2
target_decl::implied,
trace));
- assert (!exist || !p.second);
+ if (exist && p.second)
+ throw non_existent_library {p.first.template as<mtime_target> ()};
+
r = &p.first.template as<T> ();
return move (p.second);
}