new_env.Append(LINKFLAGS='-fsanitize=undefined')
werror_env = new_env.Clone()
- werror_env.Append(CCFLAGS='-Werror')
+ # Treat warnings as errors but white list some warnings that we
+ # want to allow (e.g., deprecation warnings).
+ werror_env.Append(CCFLAGS=['-Werror',
+ '-Wno-error=deprecated-declarations',
+ '-Wno-error=deprecated',
+ ])
def make_obj(source, static, extra_deps = None):
'''This function adds the specified source to the correct
# define M5_VAR_USED __attribute__((unused))
# define M5_ATTR_PACKED __attribute__ ((__packed__))
# define M5_NO_INLINE __attribute__ ((__noinline__))
+# define M5_DEPRECATED __attribute__((deprecated))
+# define M5_DEPRECATED_MSG(MSG) __attribute__((deprecated(MSG)))
#endif
#if defined(__clang__)