No other patches, only those in 'toolchain/llvm_android/patches/'.
After sync-ing the manifest, I compiled using the following command:
INFO:__main__:do_build=True do_stage1=True do_stage2=True do_runtimes=True do_package=False need_windows=False lto=False bolt=False
DEBUG:utils:subprocess.run:08:14:15
/Volumes/develop/ndk_r25c/prebuilts/python/darwin-x86/bin/python3
/Volumes/develop/ndk_r25c/external/toolchain-utils/llvm_tools/patch_manager.py
--svn_version 450784
--patch_metadata_file /Volumes/develop/ndk_r25c/toolchain/llvm_android/patches/PATCHES.json
--filesdir_path /Volumes/develop/ndk_r25c/toolchain/llvm_android/patches
--src_path /Volumes/develop/ndk_r25c/out/llvm-project.tmp --use_src_head --failure_mode fail
Traceback (most recent call last):
File "/Volumes/develop/ndk_r25c/external/toolchain-utils/llvm_tools/patch_manager.py", line 758, in <module>
main()
File "/Volumes/develop/ndk_r25c/external/toolchain-utils/llvm_tools/patch_manager.py", line 748, in main
patch_info = HandlePatches(
File "/Volumes/develop/ndk_r25c/external/toolchain-utils/llvm_tools/patch_manager.py", line 607, in HandlePatches
raise ValueError(
ValueError: Failed to apply patch: fad7e491a0770ac4336934030ac67d77e7af5520.patch
An error occurred:
Failed to apply patch: fad7e491a0770ac4336934030ac67d77e7af5520.patch.
Then I tried executing the following command:
% patch -d /Volumes/develop/ndk_r25c/out/llvm-project.tmp -f -p1 -E
--no-backup-if-mismatch
-i /Volumes/develop/ndk_r25c/toolchain/llvm_android/patches/cherry/fad7e491a0770ac4336934030ac67d77e7af5520.patch
patching file 'clang/docs/ReleaseNotes.rst'
patching file 'clang/include/clang/Basic/TargetInfo.h'
patching file 'clang/lib/Frontend/InitPreprocessor.cpp'
patching file 'clang/lib/Headers/limits.h'
patching file 'clang/lib/Sema/SemaType.cpp'
1 out of 2 hunks failed--saving rejects to 'clang/lib/Sema/SemaType.cpp.rej'
patching file 'clang/test/CodeGen/ext-int-cc.c'
patching file 'clang/test/CodeGen/ext-int.c'
patching file 'clang/test/CodeGenCXX/ext-int.cpp'
patching file 'clang/test/Headers/limits.cpp'
patching file 'clang/test/Preprocessor/init-aarch64.c'
patching file 'clang/test/Preprocessor/init.c'
patching file 'clang/test/Sema/builtins-overflow.c'
patching file 'clang/test/SemaCXX/ext-int.cpp'
After removing fad7e491a0770ac4336934030ac67d77e7af5520.patch from PATCHES.json, I encountered the same error for the following patches:
Failed to apply patch: a9a012086a917dff367bb63de2d63782b23111fc.patch.
Failed to apply patch: 786c687810a5e3db4c64312018de25c65527c40c.patch.
% patch -d /Volumes/develop/ndk_r25c/out/llvm-project.tmp -f -p1 -E
--no-backup-if-mismatch
-i /Volumes/develop/ndk_r25c/toolchain/llvm_android/patches/cherry/86617256864ebcbda03b6ce843deeb6a41a85800.patch
patching file 'llvm/test/Transforms/CodeGenPrepare/AArch64/sink-free-instructions.ll'
No such line 493 in input file, ignoring
1 out of 1 hunks failed--saving rejects to 'llvm/test/Transforms/CodeGenPrepare/AArch64/sink-free-instructions.ll.rej'
% patch -d /Volumes/develop/ndk_r25c/out/llvm-project.tmp -f -p1 -E
--no-backup-if-mismatch
-i /Volumes/develop/ndk_r25c/toolchain/llvm_android/patches/cherry/a9a012086a917dff367bb63de2d63782b23111fc.patch
patching file 'llvm/test/Transforms/CodeGenPrepare/AArch64/sink-free-instructions.ll'
No such line 584 in input file, ignoring
2 out of 2 hunks failed--saving rejects to 'llvm/test/Transforms/CodeGenPrepare/AArch64/sink-free-instructions.ll.rej'
% patch -d /Volumes/develop/ndk_r25c/out/llvm-project.tmp -f -p1 -E
--no-backup-if-mismatch
-i /Volumes/develop/ndk_r25c/toolchain/llvm_android/patches/cherry/786c687810a5e3db4c64312018de25c65527c40c.patch
patching file 'llvm/lib/Target/AArch64/AArch64ISelLowering.cpp'
patching file 'llvm/test/Transforms/CodeGenPrepare/AArch64/sink-free-instructions.ll'
No such line 497 in input file, ignoring
6 out of 7 hunks failed--saving rejects to 'llvm/test/Transforms/CodeGenPrepare/AArch64/sink-free-instructions.ll.rej'
After deleting above patches that caused errors in the toolchain/llvm_android/patches/PATCHES.json,
I compiled successfully.