@@ -3817,29 +3817,39 @@ for host in "${ALL_HOSTS[@]}"; do
3817
3817
call darwin_install_extract_symbols
3818
3818
else
3819
3819
set -x
3820
+ if [ " ${BUILD_LIBPARSER_ONLY} " ]; then
3821
+ # We don't have a toolchain so we should install to the specified dir
3822
+ CURRENT_INSTALL_DIR=" ${INSTALL_DESTDIR} "
3823
+ CURRENT_PREFIX=" /."
3824
+ else
3825
+ # If we have a toolchain, use the toolchain install dir.
3826
+ CURRENT_INSTALL_DIR=${host_install_destdir}
3827
+ CURRENT_PREFIX=" ${TOOLCHAIN_PREFIX} "
3828
+ fi
3829
+
3820
3830
# Copy executables and shared libraries from the `host_install_destdir` to
3821
3831
# INSTALL_SYMROOT and run dsymutil on them.
3822
- (cd " ${host_install_destdir } " &&
3823
- find ./" ${TOOLCHAIN_PREFIX } " -perm -0111 -type f -print | cpio --insecure -pdm " ${INSTALL_SYMROOT} " )
3832
+ (cd " ${CURRENT_INSTALL_DIR } " &&
3833
+ find ./" ${CURRENT_PREFIX } " -perm -0111 -type f -print | cpio --insecure -pdm " ${INSTALL_SYMROOT} " )
3824
3834
3825
3835
# Run dsymutil on executables and shared libraries.
3826
3836
#
3827
3837
# Exclude shell scripts.
3828
3838
(cd " ${INSTALL_SYMROOT} " &&
3829
- find ./" ${TOOLCHAIN_PREFIX } " -perm -0111 -type f -print | \
3839
+ find ./" ${CURRENT_PREFIX } " -perm -0111 -type f -print | \
3830
3840
grep -v crashlog.py | \
3831
3841
grep -v symbolication.py | \
3832
3842
xargs -n 1 -P ${BUILD_JOBS} $( xcrun_find_tool dsymutil) )
3833
3843
3834
3844
# Strip executables, shared libraries and static libraries in
3835
3845
# `host_install_destdir`.
3836
- find " ${host_install_destdir }${TOOLCHAIN_PREFIX } /" \
3846
+ find " ${CURRENT_INSTALL_DIR }${CURRENT_PREFIX } /" \
3837
3847
' (' -perm -0111 -or -name " *.a" ' )' -type f -print | \
3838
3848
xargs -n 1 -P ${BUILD_JOBS} $( xcrun_find_tool strip) -S
3839
3849
3840
3850
# Codesign dylibs after strip tool
3841
3851
# rdar://45388785
3842
- find " ${host_install_destdir }${TOOLCHAIN_PREFIX } /" \
3852
+ find " ${CURRENT_INSTALL_DIR }${CURRENT_PREFIX } /" \
3843
3853
' (' -name " *.dylib" ' )' -type f -print | \
3844
3854
xargs -n 1 -P ${BUILD_JOBS} $( xcrun_find_tool codesign) -f -s -
3845
3855
0 commit comments