Skip to content

Commit 1deee1e

Browse files
authored
Merge pull request #22065 from nkcsgexi/build-dir-pre
build-script: allow users to specify build-dir under the preset mode.
2 parents 820eb61 + fbcdbe1 commit 1deee1e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

utils/build-presets.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1779,3 +1779,4 @@ lto
17791779
no-assertions
17801780
build-libparser-only
17811781
swiftsyntax
1782+
verbose-build

utils/build-script

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,9 @@ def main_preset():
996996
parser.add_argument(
997997
"--swiftsyntax-install-prefix",
998998
help="specify the directory to where SwiftSyntax should be installed")
999+
parser.add_argument(
1000+
"--build-dir",
1001+
help="specify the directory where build artifact should be stored")
9991002
args = parser.parse_args()
10001003
if len(args.preset_file_names) == 0:
10011004
args.preset_file_names = [
@@ -1050,6 +1053,8 @@ def main_preset():
10501053
build_script_args += ["--install-swiftsyntax",
10511054
"--install-destdir",
10521055
args.swiftsyntax_install_prefix]
1056+
if args.build_dir:
1057+
build_script_args += ["--build-dir", args.build_dir]
10531058

10541059
diagnostics.note('using preset "{}", which expands to \n\n{}\n'.format(
10551060
args.preset, shell.quote_command(build_script_args)))

0 commit comments

Comments
 (0)