Skip to content

Commit 8ea9f27

Browse files
authored
Fix docker-utils (#2767)
- paths to swift-driver and yams were missing - the dispatch and foundation dir arguments became mandatory on non-macOS, this makes them optional again
1 parent d28609d commit 8ea9f27

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

Utilities/Docker/docker-utils

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,17 @@ def docker_run(command_args):
3131
"""Runs a command in the container."""
3232
swiftpm_dir = os.path.normpath(os.path.join(script_dir, '../..'))
3333
llbuild_dir = os.path.normpath(os.path.join(swiftpm_dir, '../llbuild'))
34+
swift_driver_dir = os.path.normpath(os.path.join(swiftpm_dir, '../swift-driver'))
35+
yams_dir = os.path.normpath(os.path.join(swiftpm_dir, '../yams'))
3436
call([
3537
"docker",
3638
"run",
3739
"-it",
3840
"--security-opt", "seccomp=unconfined",
3941
"-v", "%s:/swiftpm" % swiftpm_dir,
4042
"-v", "%s:/llbuild" % llbuild_dir,
43+
"-v", "%s:/swift-driver" % swift_driver_dir,
44+
"-v", "%s:/yams" % yams_dir,
4145
"-w", "/swiftpm",
4246
"--rm",
4347
"swiftpm-docker-1804"

Utilities/bootstrap

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -468,10 +468,11 @@ def build_yams(args):
468468
cmake_flags.append("-DCMAKE_C_FLAGS=-target x86_64-apple-macosx%s" % g_macos_deployment_target)
469469
cmake_flags.append("-DCMAKE_OSX_DEPLOYMENT_TARGET=%s" % g_macos_deployment_target)
470470
else:
471-
cmake_flags += [
472-
get_dispatch_cmake_arg(args),
473-
get_foundation_cmake_arg(args),
474-
]
471+
if args.dispatch_build_dir:
472+
cmake_flags.append(get_dispatch_cmake_arg(args))
473+
474+
if args.foundation_build_dir:
475+
cmake_flags.append(get_foundation_cmake_arg(args))
475476

476477
build_with_cmake(args, cmake_flags, args.yams_source_dir, args.yams_build_dir)
477478

0 commit comments

Comments
 (0)