From e5efed8e25180b9d009edf2a06e5151db107e883 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 21 Oct 2022 09:40:07 +0200 Subject: Add clarifying comment --- libbuild2/cc/link-rule.cxx | 4 ++++ libbuild2/file-cache.cxx | 2 ++ 2 files changed, 6 insertions(+) (limited to 'libbuild2') diff --git a/libbuild2/cc/link-rule.cxx b/libbuild2/cc/link-rule.cxx index 94e885f..a5fa7bc 100644 --- a/libbuild2/cc/link-rule.cxx +++ b/libbuild2/cc/link-rule.cxx @@ -995,11 +995,13 @@ namespace build2 // By default update ad hoc headers/sources during match (see // above). // +#if 1 if (!um) um = (p.is_a (x_src) || p.is_a () || (x_mod != nullptr && p.is_a (*x_mod)) || x_header (p, true)); +#endif if (*um) { @@ -1217,8 +1219,10 @@ namespace build2 { // By default update headers during match (see above). // +#if 1 if (!um) um = hdr; +#endif if (*um) { diff --git a/libbuild2/file-cache.cxx b/libbuild2/file-cache.cxx index 1c1424f..caaf40c 100644 --- a/libbuild2/file-cache.cxx +++ b/libbuild2/file-cache.cxx @@ -28,6 +28,8 @@ namespace build2 if (!comp_path_.empty ()) try_rmfile_ignore_error (comp_path_); + // Note: state remains uninit until write::close(). + pin (); return write (*this); } -- cgit v1.1