From 72bc5f226543c766e3eb4112f1a2e7fcb82bfa3c Mon Sep 17 00:00:00 2001 From: Haibin Lin Date: Sun, 24 Mar 2019 10:35:26 -0700 Subject: [PATCH 1/2] upgrade dmlc-core --- 3rdparty/dmlc-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 85d059fe0053c2ff203e641e5b891b848f9f612c Mon Sep 17 00:00:00 2001 From: Haibin Lin Date: Fri, 5 Apr 2019 17:28:52 -0700 Subject: [PATCH 2/2] Update amalgamation.py --- amalgamation/amalgamation.py | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) 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 = ''