aboutsummaryrefslogtreecommitdiff
path: root/build2/diagnostics.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build2/diagnostics.cxx')
-rw-r--r--build2/diagnostics.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/build2/diagnostics.cxx b/build2/diagnostics.cxx
index 26fd9f0..7b312a1 100644
--- a/build2/diagnostics.cxx
+++ b/build2/diagnostics.cxx
@@ -44,6 +44,15 @@ namespace build2
//
uint16_t verb = 0; // Keep disabled until set from options.
+ // Diagnostics stack.
+ //
+#ifdef __cpp_thread_local
+ thread_local
+#else
+ __thread
+#endif
+ const diag_frame* diag_frame::stack;
+
// Diagnostic facility, project specifics.
//
@@ -96,7 +105,7 @@ namespace build2
const basic_mark error ("error");
const basic_mark warn ("warning");
const basic_mark info ("info");
- const basic_mark text (nullptr);
+ const basic_mark text (nullptr, nullptr); // No type/frame.
const fail_mark fail ("error");
const fail_end endf;
}