зеркало из https://github.com/github/codeql.git
Merge branch 'main' into redsun82/bzlmod
This commit is contained in:
Коммит
0787cc5e51
|
@ -75,13 +75,6 @@ pkg_filegroup(
|
|||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
pkg_files(
|
||||
name = "swift-test-sdk-arch",
|
||||
srcs = ["//swift/third_party/swift-llvm-support:swift-test-sdk"],
|
||||
prefix = "qltest/" + codeql_platform,
|
||||
strip_prefix = strip_prefix.from_pkg(),
|
||||
)
|
||||
|
||||
pkg_filegroup(
|
||||
name = "extractor-pack-arch",
|
||||
srcs = select({
|
||||
|
@ -89,7 +82,6 @@ pkg_filegroup(
|
|||
"//conditions:default": [
|
||||
":extractor",
|
||||
":resource-dir-arch",
|
||||
":swift-test-sdk-arch",
|
||||
],
|
||||
}) + select({
|
||||
"@platforms//os:macos": [
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
| run_under: $CODEQL_EXTRACTOR_SWIFT_ROOT/tools/$CODEQL_PLATFORM/extractor -sdk $CODEQL_EXTRACTOR_SWIFT_ROOT/qltest/$CODEQL_PLATFORM/sdk -resource-dir $CODEQL_EXTRACTOR_SWIFT_ROOT/resource-dir/$CODEQL_PLATFORM -c -primary-file filtered_in.swift |
|
||||
| run_under: $CODEQL_EXTRACTOR_SWIFT_ROOT/tools/$CODEQL_PLATFORM/extractor -sdk $CODEQL_EXTRACTOR_SWIFT_ROOT/qltest/$CODEQL_PLATFORM/sdk -resource-dir $CODEQL_EXTRACTOR_SWIFT_ROOT/resource-dir/$CODEQL_PLATFORM -c -primary-file unfiltered.swift |
|
||||
| run_under: $CODEQL_EXTRACTOR_SWIFT_ROOT/tools/$CODEQL_PLATFORM/extractor -resource-dir $CODEQL_EXTRACTOR_SWIFT_ROOT/resource-dir/$CODEQL_PLATFORM -c -primary-file filtered_in.swift |
|
||||
| run_under: $CODEQL_EXTRACTOR_SWIFT_ROOT/tools/$CODEQL_PLATFORM/extractor -resource-dir $CODEQL_EXTRACTOR_SWIFT_ROOT/resource-dir/$CODEQL_PLATFORM -c -primary-file unfiltered.swift |
|
||||
|
|
|
@ -32,12 +32,3 @@ cc_library(
|
|||
}),
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
pkg_files(
|
||||
name = "swift-test-sdk",
|
||||
srcs = glob([
|
||||
"sdk/**/*",
|
||||
]),
|
||||
strip_prefix = strip_prefix.from_pkg(),
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
|
||||
|
||||
_swift_prebuilt_version = "swift-5.9.2-RELEASE.267"
|
||||
_swift_prebuilt_version = "swift-5.9.2-RELEASE.299"
|
||||
_swift_sha_map = {
|
||||
"Linux-X64": "1f65fad75aae1b14a83e7094283db4bcc2699c2d47b193e743cc4f5879097337",
|
||||
"macOS-ARM64": "d1a4f4a3516e1db6bd90a20230b1efed8ab61e005f8281e89a57111f907a35b1",
|
||||
"macOS-X64": "3fdfca17296661e19137ad2f099d1a270ee43aa317c79bb6feb67e5a29cf0ba8",
|
||||
"Linux-X64": "19e8150251601e7b27e76d1a405a72c459f9a3e2949a1e360fde15ebb4d87409",
|
||||
"macOS-ARM64": "4aaec59489c1607be0bd9ea522c1772f9368e7e29197167d3db73e0eb4fa605f",
|
||||
"macOS-X64": "16f3a248269a06b00c6a40567ca06d5494d9a0ce24e7dd7cb8534828639418e8",
|
||||
}
|
||||
|
||||
_swift_arch_map = {
|
||||
|
|
|
@ -8,14 +8,6 @@ alias(
|
|||
}),
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "swift-test-sdk",
|
||||
actual = select({
|
||||
"@bazel_tools//src/conditions:linux": "@swift_prebuilt_linux//:swift-test-sdk",
|
||||
"@bazel_tools//src/conditions:darwin": "@swift_prebuilt_darwin_x86_64//:swift-test-sdk",
|
||||
}),
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "swift-resource-dir",
|
||||
actual = select({
|
||||
|
|
|
@ -5,12 +5,11 @@ mkdir -p "$CODEQL_EXTRACTOR_SWIFT_TRAP_DIR"
|
|||
QLTEST_LOG="$CODEQL_EXTRACTOR_SWIFT_LOG_DIR"/qltest.log
|
||||
|
||||
EXTRACTOR="$CODEQL_EXTRACTOR_SWIFT_ROOT/tools/$CODEQL_PLATFORM/extractor"
|
||||
SDK="$CODEQL_EXTRACTOR_SWIFT_ROOT/qltest/$CODEQL_PLATFORM/sdk"
|
||||
RESOURCE_DIR="$CODEQL_EXTRACTOR_SWIFT_ROOT/resource-dir/$CODEQL_PLATFORM"
|
||||
export CODEQL_EXTRACTOR_SWIFT_LOG_LEVELS=${CODEQL_EXTRACTOR_SWIFT_LOG_LEVELS:-out:text:no_logs,out:console:info}
|
||||
for src in *.swift; do
|
||||
env=()
|
||||
opts=(-sdk "$SDK" -resource-dir "$RESOURCE_DIR" -c -primary-file "$src")
|
||||
opts=(-resource-dir "$RESOURCE_DIR" -c -primary-file "$src")
|
||||
opts+=($(sed -n '1 s=//codeql-extractor-options:==p' $src))
|
||||
expected_status=$(sed -n 's=//codeql-extractor-expected-status:[[:space:]]*==p' $src)
|
||||
expected_status=${expected_status:-0}
|
||||
|
|
|
@ -60,8 +60,8 @@ def assert_extractor_executed_with(*flags):
|
|||
for actual, expected in itertools.zip_longest(execution, flags):
|
||||
if actual:
|
||||
actual = actual.strip()
|
||||
expected_prefix = f"-sdk {swift_root}/qltest/{platform}/sdk -resource-dir {swift_root}/resource-dir/{platform} -c -primary-file "
|
||||
assert actual.startswith(expected_prefix), f"correct sdk option not found in\n{actual}"
|
||||
expected_prefix = f"-resource-dir {swift_root}/resource-dir/{platform} -c -primary-file "
|
||||
assert actual.startswith(expected_prefix), f"correct options not found in\n{actual}"
|
||||
actual = actual[len(expected_prefix):]
|
||||
assert actual, f"\nnot encountered: {expected}"
|
||||
assert expected, f"\nunexpected: {actual}"
|
||||
|
|
Загрузка…
Ссылка в новой задаче