Skip to content

Make skip-cmake-bootstrap unconditional #7095

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

Closed
wants to merge 3 commits into from
Closed
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
12 changes: 8 additions & 4 deletions Utilities/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,7 @@ def parse_build_args(args):
args.bootstrap_dir = os.path.join(args.target_dir, "bootstrap")
args.conf = 'release' if args.release else 'debug'
args.bin_dir = os.path.join(args.target_dir, args.conf)
args.bootstrap = not args.skip_cmake_bootstrap or \
not os.path.exists(os.path.join(os.path.split(args.swiftc_path)[0], "swift-build"))
args.bootstrap = not args.skip_cmake_bootstrap

def parse_test_args(args):
"""Parses and cleans arguments necessary for the test action."""
Expand Down Expand Up @@ -635,7 +634,11 @@ def build_swiftpm_with_swiftpm(args, integrated_swift_driver):
swiftpm_args.append(os.path.join(args.bootstrap_dir, "bin/swift-bootstrap"))
else:
note("Building SwiftPM (with a prebuilt swift-build)")
swiftpm_args.append(os.path.join(os.path.split(args.swiftc_path)[0], "swift-build"))
toolchain_swift_build_path = os.path.join(os.path.split(args.swiftc_path)[0], "swift-build")
if os.path.exists(toolchain_swift_build_path):
swiftpm_args.append(toolchain_swift_build_path)
else:
swiftpm_args += ["swift", "build"]
swiftpm_args.append("--disable-sandbox")

# Enforce resolved versions to avoid stray dependencies that aren't local.
Expand Down Expand Up @@ -689,6 +692,7 @@ def call_swiftpm(args, cmd, cwd=None):
full_cmd = get_swiftpm_env_cmd(args) + cmd + get_swiftpm_flags(args)
if cwd is None:
cwd = args.project_root
print(full_cmd)
call(full_cmd, cwd=cwd, verbose=True)

# -----------------------------------------------------------
Expand Down Expand Up @@ -810,7 +814,7 @@ def get_swiftpm_flags(args):

# Ensure we are not sharing the module cache with concurrent builds in CI
local_module_cache_path=os.path.join(args.build_dir, "module-cache")
for modifier in ["-Xswiftc", "-Xbuild-tools-swiftc"]:
for modifier in ["-Xswiftc"]:
build_flags.extend([modifier, "-module-cache-path", modifier, local_module_cache_path])

# Disabled, enable this again when it works
Expand Down