From 9dc53c276f78f9097ed38a2ab825faa74bcf8832 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 31 Jul 2017 20:32:18 +0800 Subject: [PATCH] cmake: disable -fvar-tracking-assignments for config.cc there are too many variables involved in config.cc, but -fvar-tracking-assignments is enabled by default, when the compiler finds that the number of variables exceeds the limit "max-vartrack-size", it gives up, and tries again disabling this option. this change avoids the recompilation of config.cc and also silences the warning of src/common/config.cc:77:1: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without md_config_t::md_config_t(bool is_daemon) ^ Signed-off-by: Kefu Chai --- src/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2a8639aa062..5060b41bc23 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -540,6 +540,11 @@ set(libcommon_files ${auth_files} ${mds_files}) +if(HAS_VTA) + set_source_files_properties(common/config.cc + PROPERTIES COMPILE_FLAGS -fno-var-tracking-assignments) +endif() + if(FREEBSD) list(APPEND libcommon_files common/freebsd_errno.cc) elseif(DARWIN) -- 2.39.5