diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2012-12-10 17:36:28 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2013-01-11 16:02:20 +0000 |
commit | d2ba4122e2e3e3369ae1a07920acd2ae22060563 (patch) | |
tree | aa60465c83360a9adb05b25584f97ebbcd80f488 | |
parent | 4bf5db7940d3f9e8c19db3b316386d876aeb1d87 (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-x | configure.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.py b/configure.py index 4a1c679..d861c24 100755 --- a/configure.py +++ b/configure.py @@ -141,6 +141,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: |