diff --git a/3rdparty/dmlc-core b/3rdparty/dmlc-core index 55f3c7bc1d87..3ffea8694adf 160000 --- a/3rdparty/dmlc-core +++ b/3rdparty/dmlc-core @@ -1 +1 @@ -Subproject commit 55f3c7bc1d875fbc7d34fc26651bb8c6818c8355 +Subproject commit 3ffea8694adf9c0363f9abbf162dc0e4a45b22c5 diff --git a/amalgamation/amalgamation.py b/amalgamation/amalgamation.py index 0a4be02b8ff9..e47ab6b0e22e 100644 --- a/amalgamation/amalgamation.py +++ b/amalgamation/amalgamation.py @@ -46,6 +46,14 @@ if platform.system() != 'Windows': blacklist.append('windows.h') blacklist.append('process.h') + blacklist.append('Shlwapi.h') + +if platform.system() == 'Windows': + blacklist.append('unistd.h') + +if 'freebsd' not in sys.platform: + blacklist.append('sys/endian.h') + def get_sources(def_file): @@ -94,6 +102,7 @@ def find_source(name, start, stage): re1 = re.compile('<([./a-zA-Z0-9_-]*)>') re2 = re.compile('"([./a-zA-Z0-9_-]*)"') +re3 = re.compile('DMLC_EXECINFO_H') sysheaders = [] history = set([]) @@ -129,6 +138,9 @@ def expand(x, pending, stage): with open(x, 'rb') as x_h: for line in x_h.readlines(): uline = line.decode('utf-8') + if '#define DMLC_LOG_STACK_TRACE 1' in uline.strip(): + # Do not enable stacktrace logging + continue if uline.find('#include') < 0: out.write(line) continue @@ -138,10 +150,15 @@ def expand(x, pending, stage): m = re1.search(uline) if not m: m = re2.search(uline) - if not m: - print(uline + ' not found') - continue - path = m.groups()[0] + if m: + path = m.groups()[0] + else: + m = re3.search(uline) + if m: + path = 'execinfo.h' + else: + print(uline + ' not found') + continue h = path.strip('./') if "../3rdparty/" not in path else path if h.endswith('complex.h') and x.endswith('openblas_config.h'): source = ''