aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2024-05-15 11:23:52 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2024-05-15 11:23:52 +0200
commit6f1c4669933a85c0875ac2721574bf50c2f310e8 (patch)
treedead280b23a15dc18b9ed2419e3984b04e945a93
parenta1b893afc5c58fee6df5fb895cd489ec83e6facf (diff)
Add note on potentially mismatching cxx.std in module sidebuilds
-rw-r--r--libbuild2/cc/compile-rule.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/libbuild2/cc/compile-rule.cxx b/libbuild2/cc/compile-rule.cxx
index 5acd698..7629ed5 100644
--- a/libbuild2/cc/compile-rule.cxx
+++ b/libbuild2/cc/compile-rule.cxx
@@ -6677,6 +6677,15 @@ namespace build2
//
string extra;
+ // @@ What happens if different projects used different standards?
+ // Specifically, how do we detect this and what can the user do
+ // about it? For the latter question, forcing the same standard
+ // with config.cxx.std seems like the only sensible option. For
+ // the former, we could read the value of cxx.std using our
+ // buildfile first-line peeking mechanism. But doing that for
+ // every module interface feels inefficient so we will probably
+ // need to cache it on the per-project basis. Maybe/later.
+ //
if (const string* std = cast_null<string> (rs[x_std]))
extra += string (x) + ".std = " + *std + '\n';