Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import PackageDescription
let package = Package(
name: "swift-format",
platforms: [
.iOS("13.0"),
.macOS("10.15")
.macOS("12.0"),
.iOS("13.0")
],
products: [
.executable(
Expand Down Expand Up @@ -144,7 +144,7 @@ func hasEnvironmentVariable(_ name: String) -> Bool {

// When building the toolchain on the CI, don't add the CI's runpath for the
// final build before installing.
var installAction: Bool { hasEnvironmentVariable("SOURCEKIT_LSP_CI_INSTALL") }
var installAction: Bool { hasEnvironmentVariable("SWIFTFORMAT_CI_INSTALL") }

/// Assume that all the package dependencies are checked out next to sourcekit-lsp and use that instead of fetching a
/// remote dependency.
Expand Down
24 changes: 3 additions & 21 deletions build-script-helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,33 +110,15 @@ def get_swiftpm_options(
swift_exec, cross_compile_config=cross_compile_config
)
build_os = build_target.split("-")[2]
if build_os.startswith("macosx"):
args += [
"-Xlinker",
"-rpath",
"-Xlinker",
"/usr/lib/swift",
]
args += [
"-Xlinker",
"-rpath",
"-Xlinker",
"@executable_path/../lib/swift/macosx",
]
args += [
"-Xlinker",
"-rpath",
"-Xlinker",
"@executable_path/../lib/swift-5.5/macosx",
]
else:
if not build_os.startswith("macosx"):
# Library rpath for swift, dispatch, Foundation, etc. when installing
args += [
"-Xlinker",
"-rpath",
"-Xlinker",
"$ORIGIN/../lib/swift/" + build_os,
]
args += ['--disable-local-rpath']

if cross_compile_host:
if build_os.startswith("macosx") and cross_compile_host.startswith("macosx-"):
Expand All @@ -151,7 +133,7 @@ def get_swiftpm_environment_variables(action: str):
env = dict(os.environ)
env["SWIFTCI_USE_LOCAL_DEPS"] = "1"
if action == "install":
env["SOURCEKIT_LSP_CI_INSTALL"] = "1"
env["SWIFTFORMAT_CI_INSTALL"] = "1"
return env


Expand Down