[libclc] r184982 - Allow targets to override generic implementations
Tom Stellard
thomas.stellard at amd.com
Wed Jun 26 11:20:05 PDT 2013
Author: tstellar
Date: Wed Jun 26 13:20:05 2013
New Revision: 184982
URL: http://llvm.org/viewvc/llvm-project?rev=184982&view=rev
Log:
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
Modified:
libclc/trunk/configure.py
Modified: libclc/trunk/configure.py
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/configure.py?rev=184982&r1=184981&r2=184982&view=diff
==============================================================================
--- libclc/trunk/configure.py (original)
+++ libclc/trunk/configure.py Wed Jun 26 13:20:05 2013
@@ -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:
More information about the cfe-commits
mailing list