Skip to content

Commit 3040837

Browse files
committed
Swift: introduce Xcode autobuilder
1 parent 7c912ea commit 3040837

File tree

4 files changed

+504
-0
lines changed

4 files changed

+504
-0
lines changed

swift/BUILD.bazel

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ pkg_files(
3030
prefix = "tools",
3131
)
3232

33+
pkg_files(
34+
name = "autobuild",
35+
srcs = ["tools/autobuild.sh"],
36+
attributes = pkg_attributes(mode = "0755"),
37+
prefix = "tools",
38+
)
39+
3340
pkg_files(
3441
name = "tracing-config",
3542
srcs = ["tools/tracing-config.lua"],
@@ -48,6 +55,7 @@ pkg_filegroup(
4855
":manifest",
4956
":qltest",
5057
":tracing-config",
58+
":autobuild",
5159
],
5260
visibility = ["//visibility:public"],
5361
)
@@ -58,6 +66,12 @@ pkg_runfiles(
5866
prefix = "tools/" + codeql_platform,
5967
)
6068

69+
pkg_runfiles(
70+
name = "xcode-autobuilder",
71+
srcs = ["//swift/xcode-autobuilder"],
72+
prefix = "tools/" + codeql_platform,
73+
)
74+
6175
pkg_files(
6276
name = "swift-test-sdk-arch",
6377
srcs = ["//swift/tools/prebuilt:swift-test-sdk"],
@@ -70,6 +84,7 @@ pkg_filegroup(
7084
srcs = [
7185
":extractor",
7286
":swift-test-sdk-arch",
87+
":xcode-autobuilder",
7388
],
7489
visibility = ["//visibility:public"],
7590
)

swift/tools/autobuild.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
exec "${CODEQL_EXTRACTOR_SWIFT_ROOT}/tools/${CODEQL_PLATFORM}/xcode-autobuilder"

swift/xcode-autobuilder/BUILD.bazel

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
load("//swift:rules.bzl", "swift_cc_binary")
2+
3+
swift_cc_binary(
4+
name = "xcode-autobuilder",
5+
srcs = glob([
6+
"*.cpp",
7+
]),
8+
visibility = ["//swift:__pkg__"],
9+
linkopts = [
10+
"-lxml2",
11+
"-framework CoreFoundation",
12+
],
13+
)

0 commit comments

Comments
 (0)