Files
codeql/swift/third_party/BUILD.swift-llvm-support.bazel
Paolo Tranquilli 5b5dc9c708 Bazel: load rules_cc explicitly
Turns out in https://github.com/github/codeql/pull/21371 I was right
about `java_*` rules not relying on autoload anywhere, but it turns out
some `cc_*` rules still relied on autoload. This autoload is currently
configured in the internal repository, but we want to remove it
eventually. This patch:
* adds explicit loads to `rules_cc`
* removes an obsolete file (that depedency has its own bazel module
  since some time, we just forgot to remove the old file)
2026-02-25 13:52:25 +01:00

50 lines
959 B
Plaintext

load("@rules_cc//cc:defs.bzl", "cc_library")
cc_library(
name = "swift-llvm-support-static",
srcs = glob(
[
"*.a",
],
),
hdrs = glob([
"include/**/*",
"stdlib/**/*",
]),
includes = [
"include",
"stdlib/public/SwiftShims",
],
deps = [
"@zstd",
],
)
cc_library(
name = "swift-llvm-support",
srcs = glob(
[
"*.so",
"*.dylib",
],
allow_empty = True, # Either *.so or *.dylib will be empty
),
linkopts = [
"-lm",
"-lz",
] + select({
"@platforms//os:linux": [
"-luuid",
"-lrt",
"-lpthread",
"-ldl",
],
"@platforms//os:macos": [
"-L/usr/lib/swift",
],
"//conditions:default": [],
}),
visibility = ["//visibility:public"],
deps = [":swift-llvm-support-static"],
)