[Libclc-dev] [PATCH] configure: Allow targets to override generic cl implementations with LLVM IR

Tom Stellard tom at stellard.net
Tue Oct 2 14:01:43 PDT 2012


From: Tom Stellard <thomas.stellard at amd.com>

---
 configure.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/configure.py b/configure.py
index 66c6410..0449a0e 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)
-- 
1.7.11.4





More information about the Libclc-dev mailing list