From 327f78fd8474eb5e0bd13aaba6c9c4dcc9cd1f1d Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 2 Oct 2012 20:58:46 +0000 Subject: configure: Allow targets to override generic cl implementations with LLVM IR --- configure.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/configure.py b/configure.py index 83a9375..2084178 100755 --- a/configure.py +++ b/configure.py @@ -112,8 +112,12 @@ for target in targets: manifest_deps.add(subdir_list_file) for src in open(subdir_list_file).readlines(): src = src.rstrip() - if src not in sources_seen: - sources_seen.add(src) + # Only add the base filename (e.g. Add get_global_id instead of + # get_global_id.cl) to sources_seen. + # This allows targets to overide generic .cl sources with .ll sources. + src_base = os.path.splitext(src)[0] + if src_base not in sources_seen: + sources_seen.add(src_base) obj = os.path.join(target, 'lib', src + '.bc') objects.append(obj) src_file = os.path.join(libdir, src) -- cgit v1.2.3