Skip to content

Commit 93df66a

Browse files
authored
Merge pull request #25648 from hyp/fix_compiler_rt_copy_again
Do not copy the compiler-rt builtins if the destination directory doesn't exist
2 parents 16bc322 + 1cf12f9 commit 93df66a

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

utils/build-script-impl

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2957,16 +2957,18 @@ for host in "${ALL_HOSTS[@]}"; do
29572957
DEST_CXX_BUILTINS_VERSION=$(ls "$llvm_build_dir/lib/clang" | awk '{print $0}')
29582958
DEST_BUILTINS_DIR="$llvm_build_dir/lib/clang/$DEST_CXX_BUILTINS_VERSION/lib/darwin"
29592959

2960-
echo "copying compiler-rt embedded builtins into the local clang build directory $DEST_BUILTINS_DIR."
2960+
if [ -d "$DEST_BUILTINS_DIR" ]; then
2961+
echo "copying compiler-rt embedded builtins into the local clang build directory $DEST_BUILTINS_DIR."
29612962

2962-
if [ -f "$HOST_CXX_BUILTINS_DIR/libclang_rt.ios.a" ]; then
2963-
call cp "$HOST_CXX_BUILTINS_DIR/libclang_rt.ios.a" "$DEST_BUILTINS_DIR/libclang_rt.ios.a"
2964-
fi
2965-
if [ -f "$HOST_CXX_BUILTINS_DIR/libclang_rt.watchos.a" ]; then
2966-
call cp "$HOST_CXX_BUILTINS_DIR/libclang_rt.watchos.a" "$DEST_BUILTINS_DIR/libclang_rt.watchos.a"
2967-
fi
2968-
if [ -f "$HOST_CXX_BUILTINS_DIR/libclang_rt.tvos.a" ]; then
2969-
call cp "$HOST_CXX_BUILTINS_DIR/libclang_rt.tvos.a" "$DEST_BUILTINS_DIR/libclang_rt.tvos.a"
2963+
if [ -f "$HOST_CXX_BUILTINS_DIR/libclang_rt.ios.a" ]; then
2964+
call cp "$HOST_CXX_BUILTINS_DIR/libclang_rt.ios.a" "$DEST_BUILTINS_DIR/libclang_rt.ios.a"
2965+
fi
2966+
if [ -f "$HOST_CXX_BUILTINS_DIR/libclang_rt.watchos.a" ]; then
2967+
call cp "$HOST_CXX_BUILTINS_DIR/libclang_rt.watchos.a" "$DEST_BUILTINS_DIR/libclang_rt.watchos.a"
2968+
fi
2969+
if [ -f "$HOST_CXX_BUILTINS_DIR/libclang_rt.tvos.a" ]; then
2970+
call cp "$HOST_CXX_BUILTINS_DIR/libclang_rt.tvos.a" "$DEST_BUILTINS_DIR/libclang_rt.tvos.a"
2971+
fi
29702972
fi
29712973
fi
29722974
fi

0 commit comments

Comments
 (0)