Skip to content

Commit a80e920

Browse files
authored
Merge pull request github#11639 from github/alexdenisov/switch-to-bootstrapped-swift
Swift: switch to bootstrapped Swift compiler
2 parents 8a89849 + ee94849 commit a80e920

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

misc/bazel/workspace.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
22
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
33

4-
_swift_prebuilt_version = "swift-5.7.1-RELEASE.44428.89"
4+
_swift_prebuilt_version = "swift-5.7.1-RELEASE.44582.104"
55
_swift_sha_map = {
6-
"Linux-X64": "1fa0b62b3a87c6528bd21b3f3fa1b32ad00e2b6ff04c20652c93c7d00c4cf517",
7-
"macOS-X64": "6e1239335874cbde635ae9ca9eeb215efee4988888a75f4eda1abbcf97e4d038",
6+
"Linux-X64": "8d94f2d75f2aa9ee8e5421318d2f07b27e095127c9be0156794a88d8e9a0f19a",
7+
"macOS-X64": "5f0550d2924e7071d006a0c9802acbd9a11f0017073e4a1eb27b7ddc4764f3f2",
88
}
99

1010
_swift_arch_map = {

swift/extractor/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "swift/extractor/remapping/SwiftOpenInterception.h"
1717
#include "swift/extractor/invocation/SwiftDiagnosticsConsumer.h"
1818
#include "swift/extractor/trap/TrapDomain.h"
19+
#include <swift/Basic/InitializeSwiftModules.h>
1920

2021
using namespace std::string_literals;
2122

@@ -129,6 +130,7 @@ int main(int argc, char** argv) {
129130
// Required by Swift/LLVM
130131
PROGRAM_START(argc, argv);
131132
INITIALIZE_LLVM();
133+
initializeSwiftModules();
132134

133135
codeql::SwiftExtractorConfiguration configuration{};
134136
configuration.trapDir = getenv_or("CODEQL_EXTRACTOR_SWIFT_TRAP_DIR", ".");

swift/third_party/swift-llvm-support/BUILD.swift-prebuilt.bazel

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,15 @@ cc_library(
77
] + select({
88
"@platforms//os:linux": [
99
"libCodeQLSwiftFrontendTool.so",
10+
"libswiftCore.so",
1011
],
1112
"@platforms//os:macos": [
1213
"libCodeQLSwiftFrontendTool.dylib",
14+
"libswiftCore.dylib",
15+
"libswiftCompatibility50.a",
16+
"libswiftCompatibility51.a",
17+
"libswiftCompatibilityConcurrency.a",
18+
"libswiftCompatibilityDynamicReplacements.a",
1319
],
1420
}),
1521
hdrs = glob(["include/**/*", "stdlib/**/*" ]),
@@ -23,6 +29,9 @@ cc_library(
2329
"-lpthread",
2430
"-ldl",
2531
],
32+
"@platforms//os:macos": [
33+
"-L/usr/lib/swift",
34+
],
2635
"//conditions:default": [],
2736
}),
2837
includes = [ "include" ],

0 commit comments

Comments
 (0)