Skip to content

Commit 5b6f987

Browse files
authored
Merge pull request #25652 from hyp/5.1-build-script-compiler-rt-fix
[5.1] Do not copy the compiler-rt builtins if the destination directory doe…
2 parents f943af2 + 8b54a53 commit 5b6f987

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
@@ -2934,16 +2934,18 @@ for host in "${ALL_HOSTS[@]}"; do
29342934
DEST_CXX_BUILTINS_VERSION=$(ls "$llvm_build_dir/lib/clang" | awk '{print $0}')
29352935
DEST_BUILTINS_DIR="$llvm_build_dir/lib/clang/$DEST_CXX_BUILTINS_VERSION/lib/darwin"
29362936

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

2939-
if [ -f "$HOST_CXX_BUILTINS_DIR/libclang_rt.ios.a" ]; then
2940-
call cp "$HOST_CXX_BUILTINS_DIR/libclang_rt.ios.a" "$DEST_BUILTINS_DIR/libclang_rt.ios.a"
2941-
fi
2942-
if [ -f "$HOST_CXX_BUILTINS_DIR/libclang_rt.watchos.a" ]; then
2943-
call cp "$HOST_CXX_BUILTINS_DIR/libclang_rt.watchos.a" "$DEST_BUILTINS_DIR/libclang_rt.watchos.a"
2944-
fi
2945-
if [ -f "$HOST_CXX_BUILTINS_DIR/libclang_rt.tvos.a" ]; then
2946-
call cp "$HOST_CXX_BUILTINS_DIR/libclang_rt.tvos.a" "$DEST_BUILTINS_DIR/libclang_rt.tvos.a"
2940+
if [ -f "$HOST_CXX_BUILTINS_DIR/libclang_rt.ios.a" ]; then
2941+
call cp "$HOST_CXX_BUILTINS_DIR/libclang_rt.ios.a" "$DEST_BUILTINS_DIR/libclang_rt.ios.a"
2942+
fi
2943+
if [ -f "$HOST_CXX_BUILTINS_DIR/libclang_rt.watchos.a" ]; then
2944+
call cp "$HOST_CXX_BUILTINS_DIR/libclang_rt.watchos.a" "$DEST_BUILTINS_DIR/libclang_rt.watchos.a"
2945+
fi
2946+
if [ -f "$HOST_CXX_BUILTINS_DIR/libclang_rt.tvos.a" ]; then
2947+
call cp "$HOST_CXX_BUILTINS_DIR/libclang_rt.tvos.a" "$DEST_BUILTINS_DIR/libclang_rt.tvos.a"
2948+
fi
29472949
fi
29482950
fi
29492951
fi

0 commit comments

Comments
 (0)