Skip to content

Commit baca935

Browse files
authored
Merge pull request #1763 from ahoppen/show-bin-path
Add option to show bin build directory
2 parents 53e0734 + 3727714 commit baca935

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

Utilities/bootstrap

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -928,6 +928,9 @@ def main():
928928
help="Extra actions to perform. Can be any number of "
929929
"the following: [clean, all, test, install]",
930930
nargs="*", default=["all"])
931+
parser.add_argument("--show-bin-path", action='store_true',
932+
help="output the path to which the swiftpm binaries "
933+
"are built")
931934
parser.add_argument("--swiftc", dest="swiftc_path",
932935
help="path to the swift compiler [%(default)s]",
933936
metavar="PATH")
@@ -1064,6 +1067,13 @@ def main():
10641067
args.llbuild_build_dir = os.path.join(target_path, conf, "llbuild")
10651068
should_build_llbuild = True
10661069

1070+
libdir = os.path.join(target_path, "lib")
1071+
bindir = os.path.join(target_path, conf)
1072+
1073+
if args.show_bin_path:
1074+
print(bindir)
1075+
sys.exit(0)
1076+
10671077
checkTool(["rsync", "--version"])
10681078

10691079
# If the action is "clean", just remove the bootstrap and build directories.
@@ -1112,9 +1122,6 @@ def main():
11121122
processed_runtimes[version] = process_runtime_libraries(
11131123
build, args, lib_path)
11141124

1115-
1116-
libdir = os.path.join(target_path, "lib")
1117-
bindir = os.path.join(target_path, conf)
11181125
mkdir_p(bindir)
11191126
bootstrapped_product = os.path.join(bindir, "swift-build-stage1")
11201127

0 commit comments

Comments
 (0)