Skip to content

Commit cfb99ae

Browse files
authored
Make android paths easier to override (#260)
At the moment, the OpenCL-ICD-Loader checkout in android is using a patch to override the vendor/layer paths staticaly in the source code. This patch aims at dropping that patch in android. It also moves the overload to the build system file (Soong's blueprint for android) instead of having it staticaly inline in the source code. https://android.googlesource.com/platform/external/OpenCL-ICD-Loader/+/refs/heads/main/loader/icd_platform.h
1 parent f234761 commit cfb99ae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

loader/icd_platform.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,12 @@
2424
#define PATH_SEPARATOR ':'
2525
#define DIRECTORY_SYMBOL '/'
2626
#ifdef __ANDROID__
27+
#ifndef ICD_VENDOR_PATH
2728
#define ICD_VENDOR_PATH "/system/vendor/Khronos/OpenCL/vendors"
29+
#endif // ICD_VENDOR_PATH
30+
#ifndef LAYER_PATH
2831
#define LAYER_PATH "/system/vendor/Khronos/OpenCL/layers"
32+
#endif // LAYER_PATH
2933
#else
3034
#define ICD_VENDOR_PATH "/etc/OpenCL/vendors"
3135
#define LAYER_PATH "/etc/OpenCL/layers"

0 commit comments

Comments
 (0)