[libclc] 37/291: Allow targets to override generic implementations

Andreas Beckmann anbe at moszumanska.debian.org
Tue Sep 8 10:53:30 UTC 2015


This is an automated email from the git hooks/post-receive script.

anbe pushed a commit to branch master
in repository libclc.

commit 513ac41c593d84a18de40761118d85d0b4dc73a8
Author: Tom Stellard <thomas.stellard at amd.com>
Date:   Wed Jun 26 18:20:05 2013 +0000

    Allow targets to override generic implementations
    
    Targets can override generic implementations by adding a file called
    OVERRIDES in $(TARGET_DIR)/lib and listing the generic implementations
    that it wants to override.  For example, to override get_group_id() and
    get_global_size() you would add these lines to the OVERRIDES file:
    
    workitem/get_group_id.cl
    workitem/get_global_size.cl
    
    git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@184982 91177308-0d34-0410-b5e6-96231b3b80d8
---
 configure.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/configure.py b/configure.py
index a35537a..ec443ad 100755
--- a/configure.py
+++ b/configure.py
@@ -142,6 +142,14 @@ for target in targets:
   for libdir in libdirs:
     subdir_list_file = os.path.join(libdir, 'SOURCES')
     manifest_deps.add(subdir_list_file)
+    override_list_file = os.path.join(libdir, 'OVERRIDES')
+
+    # Add target overrides
+    if os.path.exists(override_list_file):
+      for override in open(override_list_file).readlines():
+        override = override.rstrip()
+        sources_seen.add(override)
+
     for src in open(subdir_list_file).readlines():
       src = src.rstrip()
       if src not in sources_seen:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/libclc.git



More information about the Pkg-opencl-commits mailing list