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