summaryrefslogtreecommitdiffstats
path: root/libclc/configure.py
diff options
context:
space:
mode:
authorJan Vesely <jan.vesely@rutgers.edu>2017-10-05 20:16:28 +0000
committerJan Vesely <jan.vesely@rutgers.edu>2017-10-05 20:16:28 +0000
commit391305638cfa2a0ffed1e8ade63b78974b949927 (patch)
tree9a5b8cbd238b909503e074bd074f48ead0d64e56 /libclc/configure.py
parent6ae88262a8ff96e5665392a1f9922496cb2448ba (diff)
downloadbcm5719-llvm-391305638cfa2a0ffed1e8ade63b78974b949927.tar.gz
bcm5719-llvm-391305638cfa2a0ffed1e8ade63b78974b949927.zip
configure: Fix handling of directories with compats only source lists
Reviewer: Jeroen Ketema Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 315018
Diffstat (limited to 'libclc/configure.py')
-rwxr-xr-xlibclc/configure.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/libclc/configure.py b/libclc/configure.py
index 00d1ecbc223..26ac3d5622a 100755
--- a/libclc/configure.py
+++ b/libclc/configure.py
@@ -185,7 +185,8 @@ for target in targets:
incdirs = filter(os.path.isdir,
[os.path.join(srcdir, subdir, 'include') for subdir in subdirs])
- libdirs = filter(lambda d: os.path.isfile(os.path.join(d, 'SOURCES')),
+ libdirs = filter(lambda d: os.path.isfile(os.path.join(d, 'SOURCES')) or
+ os.path.isfile(os.path.join(d, 'SOURCES_' + llvm_string_version)),
[os.path.join(srcdir, subdir, 'lib') for subdir in subdirs])
# The above are iterables in python3 but we might use them multiple times
@@ -218,7 +219,8 @@ for target in targets:
for libdir in libdirs:
subdir_list_file = os.path.join(libdir, 'SOURCES')
- manifest_deps.add(subdir_list_file)
+ if os.path.exists(subdir_list_file):
+ manifest_deps.add(subdir_list_file)
override_list_file = os.path.join(libdir, 'OVERRIDES')
compat_list_file = os.path.join(libdir,
'SOURCES_' + llvm_string_version)
@@ -227,6 +229,7 @@ for target in targets:
# Build compat list
if os.path.exists(compat_list_file):
+ manifest_deps.add(compat_list_file)
for compat in open(compat_list_file).readlines():
compat = compat.rstrip()
compats.append(compat)
@@ -243,7 +246,8 @@ for target in targets:
override = override.rstrip()
sources_seen.add(override)
- for src in open(subdir_list_file).readlines() + compats:
+ files = open(subdir_list_file).readlines() if os.path.exists(subdir_list_file) else []
+ for src in files + compats:
src = src.rstrip()
if src not in sources_seen:
sources_seen.add(src)
OpenPOWER on IntegriCloud