blob: 72d5bab5de501b140585ea04d669ebac0d5a6d9d [file] [edit]
package {
default_applicable_licenses: ["OpenCL-ICD-Loader_license"],
default_visibility: ["//visibility:public"],
}
license {
name: "OpenCL-ICD-Loader_license",
visibility: [":__subpackages__"],
license_kinds: ["SPDX-license-identifier-Apache-2.0"],
license_text: ["LICENSE"],
}
cc_library_shared {
/*
Applications expect to be able to link against
libOpenCL.so. Therefore, the module name must match.
*/
name: "libOpenCL",
compile_multilib: "both",
srcs: [
"loader/icd.c",
"loader/icd_dispatch.c",
"loader/icd_dispatch_generated.c",
"loader/linux/icd_linux.c",
"loader/linux/icd_linux_envvars.c",
],
version_script: "loader/linux/icd_exports.map",
header_libs: ["OpenCL-Headers"],
generated_headers: ["generate_cmake_config"],
export_header_lib_headers: ["OpenCL-Headers"],
local_include_dirs: ["loader"],
cflags: [
"-DCL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES",
"-DCL_TARGET_OPENCL_VERSION=300",
"-DOPENCL_ICD_LOADER_VERSION_MAJOR=3",
"-DOPENCL_ICD_LOADER_VERSION_MINOR=0",
"-DOPENCL_ICD_LOADER_VERSION_REV=6",
],
soc_specific: true,
enabled: false,
}
genrule {
name: "generate_cmake_config",
out: ["icd_cmake_config.h"],
/*
Android's libc doesn't implement `secure_getenv` or `__secure_getenv`
so we just create an empty $(out) file.
*/
cmd: "touch $(out)",
visibility: ["//visibility:private"],
}