Files
codeql/swift/third_party/swift-llvm-support/BUILD.swift-llvm-support.bazel
2022-12-14 18:26:16 +01:00

49 lines
1.2 KiB
Plaintext

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"],
)