Swift: move libraries from tools to third_party

This commit is contained in:
Paolo Tranquilli
2022-10-26 05:57:08 +02:00
parent 1e8b4bdd6f
commit c8788bb5cd
10 changed files with 8 additions and 8 deletions

View File

@@ -1,7 +0,0 @@
cc_library(
name = "fishhook",
srcs = glob(["*.c"]),
hdrs = glob(["*.h"]),
strip_include_prefix = ".",
visibility = ["//visibility:public"],
)

View File

@@ -1,21 +0,0 @@
package(default_visibility = ["//swift:__subpackages__"])
#TODO we will be introducing universal binaries at a later stage, when we have both architectures prebuilt for macOS
# for the moment, we make arm build an x86_64 binary
_arch_override = {
"darwin_arm64": "darwin_x86_64",
}
[
alias(
name = name,
actual = select({
"@bazel_tools//src/conditions:%s" % arch: "@swift_prebuilt_%s//:%s" % (
_arch_override.get(arch, arch),
name,
)
for arch in ("linux", "darwin_x86_64", "darwin_arm64")
}),
)
for name in ("swift-llvm-support", "swift-test-sdk")
]

View File

@@ -1,39 +0,0 @@
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
cc_library(
name = "swift-llvm-support",
srcs = [
"libCodeQLSwiftFrontendTool.a",
] + select({
"@platforms//os:linux": [
"libCodeQLSwiftFrontendTool.so",
],
"@platforms//os:macos": [
"libCodeQLSwiftFrontendTool.dylib",
],
}),
hdrs = glob(["include/**/*", "stdlib/**/*" ]),
linkopts = [
"-lm",
"-lz",
] + select({
"@platforms//os:linux": [
"-luuid",
"-lrt",
"-lpthread",
"-ldl",
],
"//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"],
)