]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cmake: disable -fvar-tracking-assignments for config.cc
authorKefu Chai <kchai@redhat.com>
Mon, 31 Jul 2017 12:32:18 +0000 (20:32 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 31 Jul 2017 12:34:26 +0000 (20:34 +0800)
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 <kchai@redhat.com>
src/CMakeLists.txt

index 2a8639aa062ff364ada19b024c9b55dbbcce8824..5060b41bc2347f41152a4f59b4889dd6eb5704dd 100644 (file)
@@ -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)