@@ -18,6 +18,7 @@ NINJA_TARGET_RUNTIMES=install-runtimes
18
18
TAG=
19
19
declare -a COMMITS_TO_CHERRYPICK
20
20
declare -a PATCHES_TO_APPLY
21
+ declare -a COMMITS_TO_CHERRYPICK_AFTER_PATCHES
21
22
22
23
case $VERSION in
23
24
ce-trunk)
@@ -441,8 +442,9 @@ mlir-*)
441
442
442
443
if [[ $MAJOR -eq 2 && $MINOR -eq 7 ]]; then
443
444
GCC_VERSION=4.4.7
444
- PATCHES_TO_APPLY+=(" ${ROOT} /patches/ce-clang-2.7-clang-symlink.patch" )
445
+ PATCHES_TO_APPLY+=(" ${ROOT} /patches/ce-clang-2.7-clang-symlink-prerequisite .patch" )
445
446
PATCHES_TO_APPLY+=(" ${ROOT} /patches/ce-clang-2.7-default-to-intel-asm-syntax.patch" )
447
+ COMMITS_TO_CHERRYPICK_AFTER_PATCHES+=(" 16d73f92161ae43828fd6dfaa3bb887058352bcb" ) # fix for clang++ symlink being absolute
446
448
# Not adding LLVM tests ("check" target), because they expect AT&T syntax.
447
449
NINJA_EXTRA_TARGETS_NO_FAIL+=(" clang-test" )
448
450
fi
@@ -509,6 +511,13 @@ for PATCH_TO_APPLY in "${PATCHES_TO_APPLY[@]}"; do
509
511
git -C " ${ROOT} /llvm-project" apply " ${PATCH_TO_APPLY} " -v
510
512
done
511
513
514
+ for COMMIT_TO_CHERRYPICK in " ${COMMITS_TO_CHERRYPICK_AFTER_PATCHES[@]} " ; do
515
+ # It was found out that --depth=1 is not enough sometimes,
516
+ # so fetching with --depth=10 to ensure that cherry-pick succeeds.
517
+ git -C " ${ROOT} /llvm-project" fetch --depth=10 origin " ${COMMIT_TO_CHERRYPICK} " -v
518
+ git -C " ${ROOT} /llvm-project" cherry-pick -n " ${COMMIT_TO_CHERRYPICK} " -v
519
+ done
520
+
512
521
# For older LLVM versions, merge runtime and projects
513
522
# August 2021 is when bootstrapping become necessary, bootstrapping might have been supported previously a few years prior
514
523
COMMIT_DATE=$( cd " ${ROOT} /llvm-project/llvm" && git show -s --format=%ct HEAD)
0 commit comments