diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2013-06-26 18:20:05 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2013-06-26 18:20:05 +0000 |
commit | 513ac41c593d84a18de40761118d85d0b4dc73a8 (patch) | |
tree | 2c8dee0d9d29a4c24a372a88fee19ab29088a39b | |
parent | b234c94b0ea349c66c62eb669171d729104e5737 (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
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@184982 91177308-0d34-0410-b5e6-96231b3b80d8
-rwxr-xr-x | configure.py | 8 |
1 files changed, 8 insertions, 0 deletions
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: |