1load("//bazel:skia_rules.bzl", "exports_files_legacy", "skia_cc_deps", "skia_filegroup", "split_srcs_and_hdrs") 2 3licenses(["notice"]) 4 5exports_files_legacy() 6 7skia_filegroup( 8 name = "core_srcs", 9 srcs = [ 10 "SkSLRasterPipelineBuilder.cpp", 11 "SkSLRasterPipelineCodeGenerator.cpp", 12 "SkSLVMCodeGenerator.cpp", 13 ], 14) 15 16# TODO(kjlubick) Could this be split up so we don't need to compile the SkSLMetalCodeGenerator 17# on platforms that don't support metal (e.g. WebGL, Linux)? 18GPU_SRCS = [ 19 "SkSLCodeGenerator.h", 20 "SkSLGLSLCodeGenerator.cpp", 21 "SkSLGLSLCodeGenerator.h", 22 "SkSLMetalCodeGenerator.cpp", 23 "SkSLMetalCodeGenerator.h", 24 "SkSLPipelineStageCodeGenerator.cpp", 25 "SkSLPipelineStageCodeGenerator.h", 26 "SkSLSPIRVCodeGenerator.cpp", 27 "SkSLSPIRVCodeGenerator.h", 28 "SkSLSPIRVtoHLSL.cpp", 29 "SkSLSPIRVtoHLSL.h", 30 "SkSLWGSLCodeGenerator.cpp", 31 "SkSLWGSLCodeGenerator.h", 32] 33 34split_srcs_and_hdrs( 35 name = "gpu", 36 files = GPU_SRCS, 37) 38 39skia_filegroup( 40 name = "srcs", 41 srcs = [ 42 ":core_srcs", 43 ] + select({ 44 "//src/sksl:use_sksl_gpu_srcs": [":gpu_srcs"], 45 "//conditions:default": [], 46 }), 47 visibility = ["//src/sksl:__pkg__"], 48) 49 50skia_filegroup( 51 name = "private_hdrs", 52 srcs = [ 53 "SkSLRasterPipelineBuilder.h", 54 "SkSLRasterPipelineCodeGenerator.h", 55 "SkSLVMCodeGenerator.h", 56 ] + select({ 57 "//src/sksl:use_sksl_gpu_srcs": [":gpu_hdrs"], 58 "//conditions:default": [], 59 }), 60 visibility = ["//src/sksl:__pkg__"], 61) 62 63skia_cc_deps( 64 name = "deps", 65 visibility = ["//src/sksl:__pkg__"], 66 deps = select({ 67 "//src/sksl:use_sksl_gpu_srcs": ["@spirv_cross"], 68 "//conditions:default": [], 69 }), 70) 71