File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -993,8 +993,10 @@ def main_preset():
993
993
help = "Print the expanded build-script invocation generated "
994
994
"by the preset, but do not run the preset" ,
995
995
action = arguments .action .optional_bool )
996
+ parser .add_argument (
997
+ "--swiftsyntax-install-prefix" ,
998
+ help = "specify the directory to where SwiftSyntax should be installed" )
996
999
args = parser .parse_args ()
997
-
998
1000
if len (args .preset_file_names ) == 0 :
999
1001
args .preset_file_names = [
1000
1002
os .path .join (
@@ -1044,6 +1046,10 @@ def main_preset():
1044
1046
build_script_args += ["--distcc" ]
1045
1047
if args .build_jobs :
1046
1048
build_script_args += ["--jobs" , str (args .build_jobs )]
1049
+ if args .swiftsyntax_install_prefix :
1050
+ build_script_args += ["--install-swiftsyntax" ,
1051
+ "--install-destdir" ,
1052
+ args .swiftsyntax_install_prefix ]
1047
1053
1048
1054
diagnostics .note ('using preset "{}", which expands to \n \n {}\n ' .format (
1049
1055
args .preset , shell .quote_command (build_script_args )))
Original file line number Diff line number Diff line change @@ -3566,8 +3566,18 @@ for host in "${ALL_HOSTS[@]}"; do
3566
3566
exit 1
3567
3567
fi
3568
3568
echo " --- Installing ${product} ---"
3569
- DYLIB_DIR=" ${host_install_destdir}${host_install_prefix} /lib/swift/${SWIFT_HOST_VARIANT} "
3570
- MODULE_DIR=" ${DYLIB_DIR} /${SWIFT_HOST_VARIANT_ARCH} "
3569
+ if [ " ${BUILD_LIBPARSER_ONLY} " ]; then
3570
+ # We don't have a toolchain so we should install to the specified dir
3571
+ DYLIB_DIR=" ${INSTALL_DESTDIR} "
3572
+ MODULE_DIR=" ${INSTALL_DESTDIR} "
3573
+ # Install libParser is necessary
3574
+ rsync -a " $( build_directory ${host} swift) /lib/lib_InternalSwiftSyntaxParser.dylib" " ${INSTALL_DESTDIR} "
3575
+ else
3576
+ # We have a toolchain so install to the toolchain
3577
+ DYLIB_DIR=" ${host_install_destdir}${host_install_prefix} /lib/swift/${SWIFT_HOST_VARIANT} "
3578
+ MODULE_DIR=" ${DYLIB_DIR} /${SWIFT_HOST_VARIANT_ARCH} "
3579
+ fi
3580
+
3571
3581
if [[ -z " ${SKIP_INSTALL_SWIFTSYNTAX_MODULE} " ]] ; then
3572
3582
call " ${swiftsyntax_build_command[@]} " --dylib-dir=" ${DYLIB_DIR} " --swiftmodule-dir " ${MODULE_DIR} " --install
3573
3583
else
You can’t perform that action at this time.
0 commit comments