@@ -975,6 +975,9 @@ function get_host_install_destdir() {
975
975
if [[ $( should_include_host_in_lipo ${host} ) ]]; then
976
976
# If this is one of the hosts we should lipo, install in to a temporary subdirectory.
977
977
local host_install_destdir=" ${BUILD_DIR} /intermediate-install/${host} "
978
+ elif [[ " ${host} " == " merged-hosts" ]]; then
979
+ # This assumes that all hosts are merged to the lipo.
980
+ local host_install_destdir=" ${INSTALL_DESTDIR} "
978
981
else
979
982
local host_install_destdir=" ${INSTALL_DESTDIR} /${host} "
980
983
fi
@@ -1036,7 +1039,7 @@ function should_include_host_in_lipo() {
1036
1039
local host=" $1 "
1037
1040
if [[ $( has_cross_compile_hosts) ]] && [[ -z " ${SKIP_MERGE_LIPO_CROSS_COMPILE_TOOLS} " ]]; then
1038
1041
case ${host} in
1039
- iphone* | appletv* | watch* )
1042
+ macosx * | iphone* | appletv* | watch* )
1040
1043
echo 1
1041
1044
;;
1042
1045
esac
@@ -2831,6 +2834,15 @@ for host in "${ALL_HOSTS[@]}"; do
2831
2834
if [[ " ${DARWIN_INSTALL_EXTRACT_SYMBOLS} " ]] && [[ $( host_has_darwin_symbols ${host} ) ]]; then
2832
2835
echo " --- Extracting symbols ---"
2833
2836
2837
+ # The usage for this script says that lipo happens before
2838
+ # dsym extraction but that's not really what happens. At this point,
2839
+ # we're processing an individual host (eg macosx-x86_64) but targeting
2840
+ # the (shared) SYMROOT which can cause mutliple hosts to stomp on each
2841
+ # other. As a hack, I'm segregating the hosts in the symroot but it
2842
+ # would probably be better to make the script behave as the usage
2843
+ # descibes
2844
+ host_symroot=" ${INSTALL_SYMROOT} /${host} "
2845
+
2834
2846
# FIXME: Since it's hard to trace output pipe call,
2835
2847
# For now, We don't support dry-run trace for this block
2836
2848
# Instead, just echo we do "darwin_intall_extract_symbols".
@@ -2845,7 +2857,7 @@ for host in "${ALL_HOSTS[@]}"; do
2845
2857
# Copy executables and shared libraries from the `host_install_destdir` to
2846
2858
# INSTALL_SYMROOT and run dsymutil on them.
2847
2859
(cd " ${CURRENT_INSTALL_DIR} " &&
2848
- find ./" ${CURRENT_PREFIX} " -perm -0111 -type f -print | cpio --insecure -pdm " ${INSTALL_SYMROOT } " )
2860
+ find ./" ${CURRENT_PREFIX} " -perm -0111 -type f -print | cpio --insecure -pdm " ${host_symroot } " )
2849
2861
2850
2862
dsymutil_path=
2851
2863
if [[ -n " ${DARWIN_INSTALL_EXTRACT_SYMBOLS_USE_JUST_BUILT_DSYMUTIL} " ]]; then
@@ -2858,7 +2870,7 @@ for host in "${ALL_HOSTS[@]}"; do
2858
2870
#
2859
2871
# Exclude shell scripts and static archives.
2860
2872
# Exclude swift-api-digester dSYM to reduce debug toolchain size.
2861
- (cd " ${INSTALL_SYMROOT } " &&
2873
+ (cd " ${host_symroot } " &&
2862
2874
find ./" ${CURRENT_PREFIX} " -perm -0111 -type f -print | \
2863
2875
grep -v ' .py$' | \
2864
2876
grep -v ' .a$' | \
0 commit comments