"relocation truncated to fit" problem when compiling clangd

Hello,

When I compile clangd with Debug mode(-DCMAKE_BUILD_TYPE=Debug) on Windows, it raised an error as follows.

My compiler is MingW64 Gcc (Target: x86_64-w64-mingw32).

[build] Scanning dependencies of target clangd
[build] [100%] Building CXX object tools/clang/tools/extra/clangd/tool/CMakeFiles/clangd.dir/ClangdMain.cpp.obj
[build] [100%] Linking CXX executable …..........\bin\clangd.exe
[build] …/…/…/…/…/…/lib/libclangSema.a(ScopeInfo.cpp.obj):ScopeInfo.cpp:(.debug_aranges+0x6): relocation truncated to fit: secrel32 against .debug_info' [build] ../../../../../../lib/libclangEdit.a(Commit.cpp.obj):Commit.cpp:(.debug_aranges+0x6): relocation truncated to fit: secrel32 against .debug_info’
[build] …/…/…/…/…/…/lib/libclangEdit.a(EditedSource.cpp.obj):EditedSource.cpp:(.debug_aranges+0x6): relocation truncated to fit: secrel32 against .debug_info' [build] ../../../../../../lib/libclangEdit.a(RewriteObjCFoundationAPI.cpp.obj):RewriteObjCFoundationAPI.cpp:(.debug_aranges+0x6): relocation truncated to fit: secrel32 against .debug_info’
[build] …/…/…/…/…/…/lib/libclangAnalysis.a(AnalysisDeclContext.cpp.obj):AnalysisDeclContext.cpp:(.debug_aranges+0x6): relocation truncated to fit: secrel32 against .debug_info' [build] ../../../../../../lib/libclangAnalysis.a(BodyFarm.cpp.obj):BodyFarm.cpp:(.debug_aranges+0x6): relocation truncated to fit: secrel32 against .debug_info’
[build] …/…/…/…/…/…/lib/libclangAnalysis.a(CFG.cpp.obj):CFG.cpp:(.debug_aranges+0x6): relocation truncated to fit: secrel32 against .debug_info' [build] ../../../../../../lib/libclangAnalysis.a(CFGReachabilityAnalysis.cpp.obj):CFGReachabilityAnalysis.cpp:(.debug_aranges+0x6): relocation truncated to fit: secrel32 against .debug_info’
[build] …/…/…/…/…/…/lib/libclangAnalysis.a(CFGStmtMap.cpp.obj):CFGStmtMap.cpp:(.debug_aranges+0x6): relocation truncated to fit: secrel32 against .debug_info' [build] ../../../../../../lib/libclangAnalysis.a(CallGraph.cpp.obj):CallGraph.cpp:(.debug_aranges+0x6): relocation truncated to fit: secrel32 against .debug_info’
[build] …/…/…/…/…/…/lib/libclangAnalysis.a(CloneDetection.cpp.obj):CloneDetection.cpp:(.debug_aranges+0x6): additional relocation overflows omitted from the output
[build] collect2.exe: error: ld returned 1 exit status
[build] mingw32-make.exe[3]: *** [tools\clang\tools\extra\clangd\tool\CMakeFiles\clangd.dir\build.make:210: bin/clangd.exe] Error 1
[build] mingw32-make.exe[2]: *** [CMakeFiles\Makefile2:35621: tools/clang/tools/extra/clangd/tool/CMakeFiles/clangd.dir/all] Error 2
[build] mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:35633: tools/clang/tools/extra/clangd/tool/CMakeFiles/clangd.dir/rule] Error 2
[build] mingw32-make.exe: *** [Makefile:11807: clangd] Error 2

Thanks for the great work!

–Xiaodong