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/config/operation.cxx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'build2/config') diff --git a/build2/config/operation.cxx b/build2/config/operation.cxx index d5a1565..14ab38c 100644 --- a/build2/config/operation.cxx +++ b/build2/config/operation.cxx @@ -381,14 +381,18 @@ namespace build2 id < rs->operations.size (); ++id) { - const operation_info* oif (rs->operations[id]); - if (oif == nullptr) - continue; + if (const operation_info* oif = rs->operations[id]) + { + // Skip aliases (e.g., update-for-install). + // + if (oif->id != id) + continue; - set_current_oif (*oif); + set_current_oif (*oif); - phase_lock pl (run_phase::match); - match (action (configure_id, id), t); + phase_lock pl (run_phase::match); + match (action (configure_id, id), t); + } } configure_project (a, *rs, projects); -- cgit v1.1