| # Copyright 2018 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| assert(is_fuchsia) |
| |
| import("//build/toolchain/toolchain.gni") |
| import("fuchsia_sdk_pkg.gni") |
| |
| config("sdk_lib_dirs_config") { |
| visibility = [ ":*" ] |
| lib_dirs = [ "sdk/arch/${target_cpu}/lib" ] |
| } |
| |
| # Copy the loader to place it at the expected path in the final package. |
| copy("sysroot_dist_libs") { |
| sources = [ |
| "sdk/arch/${target_cpu}/sysroot/dist/lib/ld.so.1", |
| ] |
| |
| outputs = [ |
| "${root_out_dir}${shlib_subdir}/{{source_file_part}}", |
| ] |
| } |
| |
| # This adds the runtime deps for //build/config/compiler:runtime_library |
| # as that is a config target and thus cannot include data_deps. |
| group("runtime_library") { |
| data_deps = [ |
| ":sysroot_dist_libs", |
| |
| # This is used directly from //build/config/fuchsia:compiler and thus |
| # also needs to be included by default. |
| "sdk:fdio_dist_libs", |
| ] |
| } |
| |
| copy("vulkan_base_configs") { |
| sources = [ |
| "sdk/pkg/vulkan_layers/data/vulkan/explicit_layer.d/VkLayer_image_pipe_swapchain.json", |
| ] |
| |
| outputs = [ |
| "${root_gen_dir}/data/vulkan/explicit_layer.d/{{source_file_part}}", |
| ] |
| } |
| |
| copy("vulkan_image_pipe") { |
| sources = [ |
| "sdk/arch/${target_cpu}/dist/libVkLayer_image_pipe_swapchain.so", |
| ] |
| |
| outputs = [ |
| "${root_out_dir}${shlib_subdir}/{{source_file_part}}", |
| ] |
| } |
| |
| group("vulkan_base") { |
| data_deps = [ |
| ":vulkan_base_configs", |
| ":vulkan_image_pipe", |
| "sdk:vulkan_dist_libs", |
| ] |
| } |
| |
| copy("vulkan_validation_configs") { |
| sources = [ |
| "sdk/pkg/vulkan_layers/data/vulkan/explicit_layer.d/VkLayer_core_validation.json", |
| "sdk/pkg/vulkan_layers/data/vulkan/explicit_layer.d/VkLayer_object_tracker.json", |
| "sdk/pkg/vulkan_layers/data/vulkan/explicit_layer.d/VkLayer_parameter_validation.json", |
| "sdk/pkg/vulkan_layers/data/vulkan/explicit_layer.d/VkLayer_standard_validation.json", |
| "sdk/pkg/vulkan_layers/data/vulkan/explicit_layer.d/VkLayer_threading.json", |
| "sdk/pkg/vulkan_layers/data/vulkan/explicit_layer.d/VkLayer_unique_objects.json", |
| ] |
| |
| outputs = [ |
| "${root_gen_dir}/data/vulkan/explicit_layer.d/{{source_file_part}}", |
| ] |
| } |
| |
| copy("vulkan_validation_libs") { |
| sources = [ |
| "sdk/arch/${target_cpu}/dist/libVkLayer_core_validation.so", |
| "sdk/arch/${target_cpu}/dist/libVkLayer_object_tracker.so", |
| "sdk/arch/${target_cpu}/dist/libVkLayer_parameter_validation.so", |
| "sdk/arch/${target_cpu}/dist/libVkLayer_threading.so", |
| "sdk/arch/${target_cpu}/dist/libVkLayer_unique_objects.so", |
| ] |
| |
| outputs = [ |
| "${root_out_dir}${shlib_subdir}/{{source_file_part}}", |
| ] |
| } |
| |
| group("vulkan_validation") { |
| data_deps = [ |
| ":vulkan_validation_configs", |
| ":vulkan_validation_libs", |
| ] |
| } |