From ff9d36057bec10361428afb25e681f52b702526b Mon Sep 17 00:00:00 2001 From: Kp Date: Thu, 4 Jul 2013 02:27:07 +0000 Subject: [PATCH] Include more compiler flags in CRC field --- SConstruct | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SConstruct b/SConstruct index 3d293c71d..9dae75996 100644 --- a/SConstruct +++ b/SConstruct @@ -81,12 +81,13 @@ class DXXCommon(LazyObjectConstructor): default_builddir += '%s-' % self.host_platform if self.CC: default_builddir += '%s-' % os.path.basename(self.CC) - if self.CFLAGS: + compiler_flags = '\n'.join((getattr(self, attr) or '') for attr in ['CPPFLAGS', 'CFLAGS']) + if compiler_flags: # Mix in CRC of CFLAGS to get reasonable uniqueness # when flags are changed. A full hash is # unnecessary here. import binascii - crc = binascii.crc32(self.CFLAGS) + crc = binascii.crc32(compiler_flags) if crc < 0: crc = crc + 0x100000000 default_builddir += '{:08x}-'.format(crc)