diff --git a/tools/system_libs.py b/tools/system_libs.py index e6bbf1c3435b1..7d8de1298bde1 100644 --- a/tools/system_libs.py +++ b/tools/system_libs.py @@ -765,6 +765,9 @@ def get_cflags(self): cflags = super().get_cflags() if not self.is_debug: cflags += ['-DNDEBUG'] + # To make reproducible builds and the results of code size tests + # consistent, don't embed the actual __FILE__ paths in release builds. + cflags += ['-D__FILE__=""', '-Wno-builtin-macro-redefined'] return cflags def get_base_name(self):