summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2012-12-10 17:36:28 +0000
committerTom Stellard <thomas.stellard@amd.com>2012-12-10 20:19:20 +0000
commit9c79df566f981899ec69ec1009127d2486740548 (patch)
treeb8805cf2bc84bb81808de2076957abd2d9b8d0cc
parent647a1aad7d46fd5adf9d8eec412daf332ecfed49 (diff)
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
-rwxr-xr-xconfigure.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.py b/configure.py
index 9ae49b7..17bef95 100755
--- a/configure.py
+++ b/configure.py
@@ -111,6 +111,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: