mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
Providing `--dynamic_mode=fully` (for example setting it in `local.bazelrc`) will now work. All runfiles are now copied in the extractor pack: in dynamic mode, those will be the executable and the dynamic libraries, while in static mode only the executable will be part of the runfiles. Setting the correct `LD_LIBRARY_PATH` in `qltest.sh` then allows to run tests with this pakcage. If we need something more, we can switch to a wrapper script in place of `extractor` in the future. Notice that `LD_LIBRARY_PATH` is also set in static mode, but that has no consequence.
40 lines
902 B
Plaintext
40 lines
902 B
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",
|
|
],
|
|
"@platforms//os:macos": [
|
|
"libCodeQLSwiftFrontendTool.dylib",
|
|
],
|
|
}),
|
|
hdrs = glob(["include/**/*"]),
|
|
linkopts = [
|
|
"-lm",
|
|
"-lz",
|
|
] + select({
|
|
"@platforms//os:linux": [
|
|
"-luuid",
|
|
"-lrt",
|
|
"-lpthread",
|
|
"-ldl",
|
|
],
|
|
"//conditions:default": [],
|
|
}),
|
|
strip_include_prefix = "include",
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
pkg_files(
|
|
name = "swift-test-sdk",
|
|
srcs = glob([
|
|
"sdk/**/*",
|
|
]),
|
|
strip_prefix = strip_prefix.from_pkg(),
|
|
visibility = ["//visibility:public"],
|
|
)
|