Title: Unity il2cpp build LLVM error out of memory
Tags: android;c++;unity3d;android-ndk
Question: Android studio build unity il2cpp project export such error, I change android studio -Xmx to 4g, but it does nothing help. Any idea?
Task :unityLibrary:BuildIl2CppTask
WARNING: NDK was located by using ndk.dir property. This method is deprecated and will be removed in a future release. Please delete ndk.dir from local.properties and set android.ndkVersion to +1-575-904-1212] in all native modules in the project. https://developer.android.com/r/studio-ui/ndk-dir
NDK was located by using ndk.dir property. This method is deprecated and will be removed in a future release. Please delete ndk.dir from local.properties and set android.ndkVersion to +1-575-904-1212] in all native modules in the project. https://developer.android.com/r/studio-ui/ndk-dir
D:\CodeHub\MotionCaptureDemo\androidBuild\unityLibrary\src\main\Il2CppOutputProject\IL2CPP\build\deploy\il2cpp.exe --compile-cpp --platform=Android --architecture=armv7 --outputpath=D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/src/main/jniLibs/armeabi-v7a/libil2cpp.so --libil2cpp-static --baselib-directory=D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/src/main/jniStaticLibs/armeabi-v7a --incremental-g-c-time-slice=3 --configuration=Release --dotnetprofile=unityaot-linux --profiler-report --profiler-output-file=D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/build/il2cpp_armeabi-v7a_Release/il2cpp_conv.traceevents --print-command-line --generatedcppdir=D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput --cachedirectory=D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/build/il2cpp_armeabi-v7a_Release/il2cpp_cache --tool-chain-path=D:\software\Android\SDK\ndk\+1-575-904-1212
Starting: D:\CodeHub\MotionCaptureDemo\androidBuild\unityLibrary\src\main\Il2CppOutputProject\IL2CPP\build\deploy\bee_backend\win-x64\bee_backend.exe --profile=&quot;D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/build/il2cpp_armeabi-v7a_Release/il2cpp_cache/buildstate/backend_profiler0.traceevents&quot; --stdin-canary --dagfile=&quot;D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/build/il2cpp_armeabi-v7a_Release/il2cpp_cache/buildstate/bee.dag&quot; --continue-on-failure FinalProgram
WorkingDir: D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/build/il2cpp_armeabi-v7a_Release/il2cpp_cache/buildstate
ExitCode: 4 Duration: 0s26ms
ExitCode: 0 Duration: 0s0ms
Starting: D:\CodeHub\MotionCaptureDemo\androidBuild\unityLibrary\src\main\Il2CppOutputProject\IL2CPP\build\deploy\bee_backend\win-x64\bee_backend.exe --profile=&quot;D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/build/il2cpp_armeabi-v7a_Release/il2cpp_cache/buildstate/backend_profiler1.traceevents&quot; --stdin-canary --dagfile=&quot;D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/build/il2cpp_armeabi-v7a_Release/il2cpp_cache/buildstate/bee.dag&quot; --continue-on-failure --dagfilejson=&quot;D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/build/il2cpp_armeabi-v7a_Release/il2cpp_cache/buildstate/bee.dag.json&quot; FinalProgram
WorkingDir: D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/build/il2cpp_armeabi-v7a_Release/il2cpp_cache/buildstate
NDK was located by using ndk.dir property. This method is deprecated and will be removed in a future release. Please delete ndk.dir from local.properties and set android.ndkVersion to +1-575-904-1212] in all native modules in the project. https://developer.android.com/r/studio-ui/ndk-dir
ExitCode: 3 Duration: 9m:59s
Build failed with 434 successful nodes and 1 failed ones
Annotation: C_Android_arm32 iz17/qd5o_bly-CSharp.o
Cmdline: &quot;D:/software/Android/SDK/ndk/+1-575-904-1212/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++&quot; -march=armv7-a -mfloat-abi=softfp -mfpu=neon-fp16 -marm -D__ARM_ARCH_7__ -D__ARM_ARCH_7A__ -D__ANDROID_API__=22 -DANDROID -DHAVE_INTTYPES_H -no-canonical-prefixes -funwind-tables -fstack-protector -fdiagnostics-format=msvc -fomit-frame-pointer -std=c++11 -Wswitch -Wno-trigraphs -Wno-tautological-compare -Wno-invalid-offsetof -Wno-implicitly-unsigned-literal -Wno-integer-overflow -Wno-shift-negative-value -Wno-unknown-attributes -Wno-implicit-function-declaration -Wno-null-conversion -Wno-missing-declarations -Wno-unused-value -Wno-pragma-once-outside-header -fvisibility=hidden -fexceptions -fno-rtti -g -O2 -fPIC -fno-strict-overflow -ffunction-sections -fdata-sections -fmessage-length=0 -pipe -DBASELIB_INLINE_NAMESPACE=il2cpp_baselib -DIL2CPP_MONO_DEBUGGER_DISABLED -DRUNTIME_IL2CPP -DIL2CPP_ENABLE_WRITE_BARRIERS=1 -DIL2CPP_INCREMENTAL_TIME_SLICE=3 -DHAVE_BDWGC_GC -DNDEBUG -I&quot;.&quot; -I&quot;D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput&quot; -I&quot;D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/libil2cpp/pch&quot; -I&quot;D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/libil2cpp&quot; -I&quot;D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/external/baselib/Include&quot; -I&quot;D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/external/baselib/Platforms/Android/Include&quot; -o &quot;iz17/qd5o_bly-CSharp.o&quot; -fcolor-diagnostics -fdiagnostics-absolute-paths -target armv7a-linux-androideabi22 -fstrict-aliasing -fdiagnostics-format=msvc -c -x c++ &quot;D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput/Assembly-CSharp.cpp&quot;
ExitCode: 1
Stdout:
LLVM ERROR: out of memory
Stack dump:
0.  Program arguments: D:/software/Android/SDK/ndk/+1-575-904-1212/toolchains/llvm/prebuilt/windows-x86_64/bin\clang++.exe -cc1 -triple armv7-unknown-linux-android22 -emit-obj -mnoexecstack -disable-free -disable-llvm-verifier -discard-value-names -main-file-name Assembly-CSharp.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu generic -target-feature +soft-float-abi -target-feature +fpregs -target-feature +vfp2 -target-feature +vfp2d16 -target-feature +vfp2d16sp -target-feature +vfp2sp -target-feature +vfp3 -target-feature +vfp3d16 -target-feature +vfp3d16sp -target-feature +vfp3sp -target-feature +fp16 -target-feature -vfp4 -target-feature -vfp4d16 -target-feature -vfp4d16sp -target-feature -vfp4sp -target-feature -fp-armv8 -target-feature -fp-armv8d16 -target-feature -fp-armv8d16sp -target-feature -fp-armv8sp -target-feature -fullfp16 -target-feature +fp64 -target-feature +d32 -target-feature +neon -target-feature -crypto -target-feature -fp16fml -target-abi aapcs-linux -mfloat-abi soft -fallow-half-arguments-and-returns -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -ffunction-sections -fdata-sections -coverage-notes-file D:\CodeHub\MotionCaptureDemo\androidBuild\unityLibrary\build\il2cpp_armeabi-v7a_Release\il2cpp_cache\buildstate\iz17/qd5o_bly-CSharp.gcno -resource-dir D:/software/Android/SDK/ndk/+1-575-904-1212/toolchains/llvm/prebuilt/windows-x86_64\lib64\clang\9.0.8 -D ARM_ARCH_7 -D ARM_ARCH_7A -D ANDROID_API=22 -D ANDROID -D HAVE_INTTYPES_H -D BASELIB_INLINE_NAMESPACE=il2cpp_baselib -D IL2CPP_MONO_DEBUGGER_DISABLED -D RUNTIME_IL2CPP -D IL2CPP_ENABLE_WRITE_BARRIERS=1 -D IL2CPP_INCREMENTAL_TIME_SLICE=3 -D HAVE_BDWGC_GC -D NDEBUG -I . -I D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput -I D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/libil2cpp/pch -I D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/libil2cpp -I D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/external/baselib/Include -I D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/external/baselib/Platforms/Android/Include -internal-isystem D:/software/Android/SDK/ndk/+1-575-904-1212/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/include/c++/v1 -internal-isystem D:/software/Android/SDK/ndk/+1-575-904-1212/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/local/include -internal-isystem D:/software/Android/SDK/ndk/+1-575-904-1212/toolchains/llvm/prebuilt/windows-x86_64\lib64\clang\9.0.8\include -internal-externc-isystem D:/software/Android/SDK/ndk/+1-575-904-1212/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/include/arm-linux-androideabi -internal-externc-isystem D:/software/Android/SDK/ndk/+1-575-904-1212/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/include -internal-externc-isystem D:/software/Android/SDK/ndk/+1-575-904-1212/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/include -O2 -Wswitch -Wno-trigraphs -Wno-tautological-compare -Wno-invalid-offsetof -Wno-implicitly-unsigned-literal -Wno-integer-overflow -Wno-shift-negative-value -Wno-unknown-attributes -Wno-implicit-function-declaration -Wno-null-conversion -Wno-missing-declarations -Wno-unused-value -Wno-pragma-once-outside-header -std=c++11 -fdeprecated-macro -fdebug-compilation-dir D:\CodeHub\MotionCaptureDemo\androidBuild\unityLibrary\build\il2cpp_armeabi-v7a_Release\il2cpp_cache\buildstate -ferror-limit 19 -fmessage-length 0 -fvisibility hidden -fwrapv -stack-protector 1 -fno-rtti -fno-signed-char -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fdiagnostics-format msvc -fcolor-diagnostics -fdiagnostics-absolute-paths -vectorize-loops -vectorize-slp -o iz17/qd5o_bly-CSharp.o -x c++ D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput/Assembly-CSharp.cpp
parser at end of file
Code generation
Running pass 'Function Pass Manager' on module 'D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput/Assembly-CSharp.cpp'.
Running pass 'Live DEBUG_VALUE analysis' on function '@Logo__cctor_m0B2A9E20017B45013046D090962CA14AA0DEB853'
#0 0x00007ff649b9fca6 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x4efca6)
#1 0x00007ffc3eeb1881 (C:\WINDOWS\System32\ucrtbase.dll+0x71881)
#2 0x00007ffc3eeb2851 (C:\WINDOWS\System32\ucrtbase.dll+0x72851)
#3 0x00007ff649b65824 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x4b5824)
#4 0x00007ff6496c701b (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1701b)
#5 0x00007ff649cfd1d1 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x64d1d1)
#6 0x00007ff649d046f3 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x6546f3)
#7 0x00007ff649d048b6 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x6548b6)
#8 0x00007ff64ac10e8a (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1560e8a)
#9 0x00007ff649d9a8c2 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x6ea8c2)
#10 0x00007ff6498b303b (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x20303b)
#11 0x00007ff6498b3383 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x203383)
#12 0x00007ff6498b39d5 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x2039d5)
#13 0x00007ff64a6ad5ff (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0xffd5ff)
#14 0x00007ff64a9c82e2 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x13182e2)
#15 0x00007ff64b8f13f3 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x22413f3)
#16 0x00007ff64a934a60 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1284a60)
#17 0x00007ff649c6eb7f (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x5beb7f)
#18 0x00007ff649cba8f6 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x60a8f6)
#19 0x00007ff6496b6576 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x6576)
#20 0x00007ff6496b43fa (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x43fa)
#21 0x00007ff6496b1395 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1395)
#22 0x00007ff6496b14c8 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x14c8)
#23 0x00007ffc402b7034 (C:\WINDOWS\System32\KERNEL32.DLL+0x17034)
#24 0x00007ffc410a2651 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x52651)
clang++: error: clang frontend command failed due to signal (use -v to see invocation)
Android (6454773 based on r365631c2) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 98c855489587874b2a325e7a516b99d838599c6f) (based on LLVM 9.0.8svn)
Target: armv7a-unknown-linux-android22
Thread model: posix
InstalledDir: D:/software/Android/SDK/ndk/+1-575-904-1212/toolchains/llvm/prebuilt/windows-x86_64/bin
clang++: note: diagnostic msg: PLEASE submit a bug report to https://github.com/android-ndk/ndk/issues and include the crash backtrace, preprocessed source, and associated run script.
clang++: note: diagnostic msg:
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: C:\Users\Z00430~1\AppData\Local\Temp\Assembly-CSharp-f3eb5e.cpp
clang++: note: diagnostic msg: C:\Users\Z00430~1\AppData\Local\Temp\Assembly-CSharp-f3eb5e.sh
clang++: note: diagnostic msg:
Error: Unity.IL2CPP.Building.BuilderFailedException: Build failed with 434 successful nodes and 1 failed ones
Annotation: C_Android_arm32 iz17/qd5o_bly-CSharp.o
Cmdline: &quot;D:/software/Android/SDK/ndk/+1-575-904-1212/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++&quot; -march=armv7-a -mfloat-abi=softfp -mfpu=neon-fp16 -marm -D__ARM_ARCH_7__ -D__ARM_ARCH_7A__ -D__ANDROID_API__=22 -DANDROID -DHAVE_INTTYPES_H -no-canonical-prefixes -funwind-tables -fstack-protector -fdiagnostics-format=msvc -fomit-frame-pointer -std=c++11 -Wswitch -Wno-trigraphs -Wno-tautological-compare -Wno-invalid-offsetof -Wno-implicitly-unsigned-literal -Wno-integer-overflow -Wno-shift-negative-value -Wno-unknown-attributes -Wno-implicit-function-declaration -Wno-null-conversion -Wno-missing-declarations -Wno-unused-value -Wno-pragma-once-outside-header -fvisibility=hidden -fexceptions -fno-rtti -g -O2 -fPIC -fno-strict-overflow -ffunction-sections -fdata-sections -fmessage-length=0 -pipe -DBASELIB_INLINE_NAMESPACE=il2cpp_baselib -DIL2CPP_MONO_DEBUGGER_DISABLED -DRUNTIME_IL2CPP -DIL2CPP_ENABLE_WRITE_BARRIERS=1 -DIL2CPP_INCREMENTAL_TIME_SLICE=3 -DHAVE_BDWGC_GC -DNDEBUG -I&quot;.&quot; -I&quot;D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput&quot; -I&quot;D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/libil2cpp/pch&quot; -I&quot;D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/libil2cpp&quot; -I&quot;D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/external/baselib/Include&quot; -I&quot;D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/external/baselib/Platforms/Android/Include&quot; -o &quot;iz17/qd5o_bly-CSharp.o&quot; -fcolor-diagnostics -fdiagnostics-absolute-paths -target armv7a-linux-androideabi22 -fstrict-aliasing -fdiagnostics-format=msvc -c -x c++ &quot;D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput/Assembly-CSharp.cpp&quot;
ExitCode: 1
Stdout:
LLVM ERROR: out of memory
Stack dump:
0.  Program arguments: D:/software/Android/SDK/ndk/+1-575-904-1212/toolchains/llvm/prebuilt/windows-x86_64/bin\clang++.exe -cc1 -triple armv7-unknown-linux-android22 -emit-obj -mnoexecstack -disable-free -disable-llvm-verifier -discard-value-names -main-file-name Assembly-CSharp.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu generic -target-feature +soft-float-abi -target-feature +fpregs -target-feature +vfp2 -target-feature +vfp2d16 -target-feature +vfp2d16sp -target-feature +vfp2sp -target-feature +vfp3 -target-feature +vfp3d16 -target-feature +vfp3d16sp -target-feature +vfp3sp -target-feature +fp16 -target-feature -vfp4 -target-feature -vfp4d16 -target-feature -vfp4d16sp -target-feature -vfp4sp -target-feature -fp-armv8 -target-feature -fp-armv8d16 -target-feature -fp-armv8d16sp -target-feature -fp-armv8sp -target-feature -fullfp16 -target-feature +fp64 -target-feature +d32 -target-feature +neon -target-feature -crypto -target-feature -fp16fml -target-abi aapcs-linux -mfloat-abi soft -fallow-half-arguments-and-returns -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -ffunction-sections -fdata-sections -coverage-notes-file D:\CodeHub\MotionCaptureDemo\androidBuild\unityLibrary\build\il2cpp_armeabi-v7a_Release\il2cpp_cache\buildstate\iz17/qd5o_bly-CSharp.gcno -resource-dir D:/software/Android/SDK/ndk/+1-575-904-1212/toolchains/llvm/prebuilt/windows-x86_64\lib64\clang\9.0.8 -D ARM_ARCH_7 -D ARM_ARCH_7A -D ANDROID_API=22 -D ANDROID -D HAVE_INTTYPES_H -D BASELIB_INLINE_NAMESPACE=il2cpp_baselib -D IL2CPP_MONO_DEBUGGER_DISABLED -D RUNTIME_IL2CPP -D IL2CPP_ENABLE_WRITE_BARRIERS=1 -D IL2CPP_INCREMENTAL_TIME_SLICE=3 -D HAVE_BDWGC_GC -D NDEBUG -I . -I D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput -I D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/libil2cpp/pch -I D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/libil2cpp -I D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/external/baselib/Include -I D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/external/baselib/Platforms/Android/Include -internal-isystem D:/software/Android/SDK/ndk/+1-575-904-1212/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/include/c++/v1 -internal-isystem D:/software/Android/SDK/ndk/+1-575-904-1212/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/local/include -internal-isystem D:/software/Android/SDK/ndk/+1-575-904-1212/toolchains/llvm/prebuilt/windows-x86_64\lib64\clang\9.0.8\include -internal-externc-isystem D:/software/Android/SDK/ndk/+1-575-904-1212/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/include/arm-linux-androideabi -internal-externc-isystem D:/software/Android/SDK/ndk/+1-575-904-1212/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/include -internal-externc-isystem D:/software/Android/SDK/ndk/+1-575-904-1212/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/include -O2 -Wswitch -Wno-trigraphs -Wno-tautological-compare -Wno-invalid-offsetof -Wno-implicitly-unsigned-literal -Wno-integer-overflow -Wno-shift-negative-value -Wno-unknown-attributes -Wno-implicit-function-declaration -Wno-null-conversion -Wno-missing-declarations -Wno-unused-value -Wno-pragma-once-outside-header -std=c++11 -fdeprecated-macro -fdebug-compilation-dir D:\CodeHub\MotionCaptureDemo\androidBuild\unityLibrary\build\il2cpp_armeabi-v7a_Release\il2cpp_cache\buildstate -ferror-limit 19 -fmessage-length 0 -fvisibility hidden -fwrapv -stack-protector 1 -fno-rtti -fno-signed-char -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fdiagnostics-format msvc -fcolor-diagnostics -fdiagnostics-absolute-paths -vectorize-loops -vectorize-slp -o iz17/qd5o_bly-CSharp.o -x c++ D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput/Assembly-CSharp.cpp
parser at end of file
Code generation
Running pass 'Function Pass Manager' on module 'D:/CodeHub/MotionCaptureDemo/androidBuild/unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput/Assembly-CSharp.cpp'.
Running pass 'Live DEBUG_VALUE analysis' on function '@Logo__cctor_m0B2A9E20017B45013046D090962CA14AA0DEB853'
#0 0x00007ff649b9fca6 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x4efca6)
#1 0x00007ffc3eeb1881 (C:\WINDOWS\System32\ucrtbase.dll+0x71881)
#2 0x00007ffc3eeb2851 (C:\WINDOWS\System32\ucrtbase.dll+0x72851)
#3 0x00007ff649b65824 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x4b5824)
#4 0x00007ff6496c701b (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1701b)
#5 0x00007ff649cfd1d1 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x64d1d1)
#6 0x00007ff649d046f3 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x6546f3)
#7 0x00007ff649d048b6 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x6548b6)
#8 0x00007ff64ac10e8a (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1560e8a)
#9 0x00007ff649d9a8c2 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x6ea8c2)
#10 0x00007ff6498b303b (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x20303b)
#11 0x00007ff6498b3383 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x203383)
#12 0x00007ff6498b39d5 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x2039d5)
#13 0x00007ff64a6ad5ff (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0xffd5ff)
#14 0x00007ff64a9c82e2 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x13182e2)
#15 0x00007ff64b8f13f3 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x22413f3)
#16 0x00007ff64a934a60 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1284a60)
#17 0x00007ff649c6eb7f (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x5beb7f)
#18 0x00007ff649cba8f6 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x60a8f6)
#19 0x00007ff6496b6576 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x6576)
#20 0x00007ff6496b43fa (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x43fa)
#21 0x00007ff6496b1395 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x1395)
#22 0x00007ff6496b14c8 (D:\software\Android\SDK\ndk\+1-575-904-1212\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe+0x14c8)
#23 0x00007ffc402b7034 (C:\WINDOWS\System32\KERNEL32.DLL+0x17034)
#24 0x00007ffc410a2651 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x52651)
clang++: error: clang frontend command failed due to signal (use -v to see invocation)
Android (6454773 based on r365631c2) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 98c855489587874b2a325e7a516b99d838599c6f) (based on LLVM 9.0.8svn)
Target: armv7a-unknown-linux-android22
Thread model: posix
InstalledDir: D:/software/Android/SDK/ndk/+1-575-904-1212/toolchains/llvm/prebuilt/windows-x86_64/bin
clang++: note: diagnostic msg: PLEASE submit a bug report to https://github.com/android-ndk/ndk/issues and include the crash backtrace, preprocessed source, and associated run script.
clang++: note: diagnostic msg:
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: C:\Users\Z00430~1\AppData\Local\Temp\Assembly-CSharp-f3eb5e.cpp
clang++: note: diagnostic msg: C:\Users\Z00430~1\AppData\Local\Temp\Assembly-CSharp-f3eb5e.sh
clang++: note: diagnostic msg:
at il2cpp.Program.DoRun(String[] args, RuntimePlatform platform, Il2CppCommandLineArguments il2CppCommandLineArguments, BuildingOptions buildingOptions, Boolean throwExceptions)
Unity.IL2CPP.Building.BuilderFailedException: Build failed with 434 successful nodes and 1 failed ones
Task :unityLibrary:BuildIl2CppTask FAILED


Here is another answer: Apparentely the problem is caused for IL2CPP and Script Debugging. Deactivate it and everythign will works well. For another hand, if you need debugging something, use MONO.
Comment for this answer: I found a new solution. It is easier than the last answer and you can use it with IL2CPP. Go to Player Settings, Other Settings and then C++ Compiler Configuration select Debug option.

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2022:00:01/19/22', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<android><c++><unity3d><android-ndk>', 'Title': 'Unity il2cpp build LLVM error out of memory', 'ViewCount': 855, 'id': 70764203, 'user_AboutMe': '', 'user_AccountId': 8465829.0, 'user_DisplayName': 'zhangbaochong', 'user_Reputation': 130.0, 'user_Views': 22.0, 'user_id': 6350029.0}}