blob: aeb20598e6eb2842cadf5c442f3470fbca2bfb0b [file] [log] [blame]
# Copyright (c) 2021 The Khronos Group Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# OpenCL is a trademark of Apple Inc. used under license by Khronos.
import("//build/cpp/sdk_shared_library.gni")
import("//build/sdk/sdk_documentation.gni")
source_set("opencl_dlopen") {
sources = [
"../loader/fuchsia/dlopen_fuchsia.cc",
"../loader/fuchsia/dlopen_fuchsia.h",
"../loader/fuchsia/loader_service.cc",
"../loader/fuchsia/loader_service.h",
]
deps = [
"//sdk/fidl/fuchsia.opencl.loader:fuchsia.opencl.loader_llcpp",
"//sdk/lib/fdio",
"//zircon/system/ulib/service:service-llcpp",
"//zircon/system/ulib/syslog",
]
}
source_set("opencl_icd") {
include_dirs = [ "fuchsia" ]
defines = [ "CL_TARGET_OPENCL_VERSION=300" ]
sources = [
"../loader/adapters.h",
"../loader/icd.h",
"../loader/icd_dispatch.c",
"../loader/icd_dispatch.h",
"../loader/icd_dispatch_generated.c",
"../loader/icd_envars.h",
"../loader/icd_platform.h",
]
public_deps = [ "//third_party/OpenCL-Headers:opencl_headers" ]
}
sdk_shared_library("OpenCL") {
output_name = "OpenCL"
category = "partner"
libcxx_linkage = "static"
no_headers = true
include_dirs = [
"loader",
"loader/fuchsia",
]
deps = [
":opencl_dlopen",
":opencl_icd",
"//sdk/lib/fdio",
]
runtime_deps = [ "//sdk/lib/fdio:fdio_sdk" ]
}
group("fuchsia") {
deps = [ ":OpenCL" ]
}