Skip to content

Commit e9a01cc

Browse files
committed
---
yaml --- r: 348159 b: refs/heads/master c: 586ef66 h: refs/heads/master i: 348157: ff2c849 348155: b9a008e 348151: 0d8ed89 348143: 289253a 348127: bf2c39d 348095: 19c30ef 348031: de64955 347903: 02a947d 347647: fed6594 347135: a433ebe 346111: f0a47f1 344063: 4710043
1 parent d0f0842 commit e9a01cc

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: aa05e648fda597dd3a7b2a50d31b34ad52e8b635
2+
refs/heads/master: 586ef669febf14a871aeb524d14e7c25480fa56b
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/utils/build-script-impl

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2945,6 +2945,31 @@ for host in "${ALL_HOSTS[@]}"; do
29452945
fi
29462946

29472947
call "${CMAKE_BUILD[@]}" "${build_dir}" $(cmake_config_opt ${product}) -- "${BUILD_ARGS[@]}" ${build_targets[@]}
2948+
2949+
# When we are building LLVM copy over the compiler-rt
2950+
# builtins for iOS/tvOS/watchOS to ensure that Swift's
2951+
# stdlib can use compiler-rt builtins when targetting iOS/tvOS/watchOS.
2952+
if [[ "${product}" == "llvm" ]]; then
2953+
if [[ "$(uname -s)" == "Darwin" ]] ; then
2954+
HOST_CXX_DIR=$(dirname "${HOST_CXX}")
2955+
HOST_CXX_BUILTINS_VERSION=$(ls "$HOST_CXX_DIR/../lib/clang" | awk '{print $0}')
2956+
HOST_CXX_BUILTINS_DIR="$HOST_CXX_DIR/../lib/clang/$HOST_CXX_BUILTINS_VERSION/lib/darwin"
2957+
DEST_CXX_BUILTINS_VERSION=$(ls "$llvm_build_dir/lib/clang" | awk '{print $0}')
2958+
DEST_BUILTINS_DIR="$llvm_build_dir/lib/clang/$DEST_CXX_BUILTINS_VERSION/lib/darwin"
2959+
2960+
echo "copying compiler-rt embedded builtins into the local clang build directory $DEST_BUILTINS_DIR."
2961+
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"
2970+
fi
2971+
fi
2972+
fi
29482973
fi
29492974
done
29502975
done

0 commit comments

Comments
 (0)