load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix") cc_library( name = "swift-llvm-support", srcs = [ "libCodeQLSwiftFrontendTool.a", ] + select({ "@platforms//os:linux": [ "libCodeQLSwiftFrontendTool.so", "libswiftCore.so", ], "@platforms//os:macos": [ "libCodeQLSwiftFrontendTool.dylib", "libswiftCore.dylib", "libswiftCompatibility50.a", "libswiftCompatibility51.a", "libswiftCompatibilityConcurrency.a", "libswiftCompatibilityDynamicReplacements.a", ], }), hdrs = glob(["include/**/*", "stdlib/**/*" ]), linkopts = [ "-lm", "-lz", ] + select({ "@platforms//os:linux": [ "-luuid", "-lrt", "-lpthread", "-ldl", ], "@platforms//os:macos": [ "-L/usr/lib/swift", ], "//conditions:default": [], }), includes = [ "include" ], visibility = ["//visibility:public"], ) pkg_files( name = "swift-test-sdk", srcs = glob([ "sdk/**/*", ]), strip_prefix = strip_prefix.from_pkg(), visibility = ["//visibility:public"], )