From 687e7cac244cd706c7f959f0486ab405d6942cdd Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 8 Feb 2018 14:48:31 +0200 Subject: Work around VC static initialization order issue --- build2/operation.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'build2/operation.cxx') diff --git a/build2/operation.cxx b/build2/operation.cxx index f262321..b242cb3 100644 --- a/build2/operation.cxx +++ b/build2/operation.cxx @@ -537,6 +537,10 @@ namespace build2 #ifndef _MSC_VER constexpr #else + // VC doesn't "see" this can be const-initialized so we have to hack around + // to ensure correct initialization order. + // + #pragma init_seg(lib) const #endif operation_info op_update { -- cgit v1.1