Skip to content

Unify env vars for Utilities/bootstrap commands #8154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 4, 2024
Merged
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
23 changes: 10 additions & 13 deletions Utilities/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -359,16 +359,9 @@ def test(args):
"""Builds SwiftPM, then tests itself."""
build(args)

if '-macosx' in args.build_target:
extra_env = ["SWIFTCI_DISABLE_SDK_DEPENDENT_TESTS=YES"]
else:
extra_env = []

note("Testing")
parse_test_args(args)
cmd = extra_env + [
"SWIFT_EXEC=" + args.swiftc_path,
"SWIFT_DRIVER_SWIFT_EXEC=" + args.swiftc_path,
cmd = [
os.path.join(args.bin_dir, "swift-test")
]
if args.parallel:
Expand Down Expand Up @@ -646,11 +639,7 @@ def build_swiftpm_with_cmake(args):
def build_swiftpm_with_swiftpm(args, integrated_swift_driver):
"""Builds SwiftPM using the version of SwiftPM built with CMake."""

swiftpm_args = [
"SWIFT_EXEC=" + args.swiftc_path,
"SWIFT_DRIVER_SWIFT_EXEC=" + args.swiftc_path,
"CC=" + args.clang_path
]
swiftpm_args = []

if args.bootstrap:
note("Building SwiftPM (with a freshly built swift-bootstrap)")
Expand Down Expand Up @@ -777,6 +766,14 @@ def get_swiftpm_env_cmd(args):
libs_joined = ":".join(libs + args.target_info["paths"]["runtimeLibraryPaths"])
env_cmd.append("LD_LIBRARY_PATH=%s" % libs_joined)

if '-macosx' in args.build_target:
env_cmd.append("SWIFTCI_DISABLE_SDK_DEPENDENT_TESTS=YES")

env_cmd += [
"SWIFT_EXEC=" + args.swiftc_path,
"SWIFT_DRIVER_SWIFT_EXEC=" + args.swiftc_path,
"CC=" + args.clang_path,
]
return env_cmd

def get_swiftpm_flags(args):
Expand Down