Include more compiler flags in CRC field
This commit is contained in:
parent
e0d8afc8e1
commit
ff9d36057b
|
@ -81,12 +81,13 @@ class DXXCommon(LazyObjectConstructor):
|
||||||
default_builddir += '%s-' % self.host_platform
|
default_builddir += '%s-' % self.host_platform
|
||||||
if self.CC:
|
if self.CC:
|
||||||
default_builddir += '%s-' % os.path.basename(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
|
# Mix in CRC of CFLAGS to get reasonable uniqueness
|
||||||
# when flags are changed. A full hash is
|
# when flags are changed. A full hash is
|
||||||
# unnecessary here.
|
# unnecessary here.
|
||||||
import binascii
|
import binascii
|
||||||
crc = binascii.crc32(self.CFLAGS)
|
crc = binascii.crc32(compiler_flags)
|
||||||
if crc < 0:
|
if crc < 0:
|
||||||
crc = crc + 0x100000000
|
crc = crc + 0x100000000
|
||||||
default_builddir += '{:08x}-'.format(crc)
|
default_builddir += '{:08x}-'.format(crc)
|
||||||
|
|
Loading…
Reference in a new issue