https://llvm.org/devmtg/2017-10/slides/Ueyama-lld.pdf

리눅스에서 gcc 로 빌드하는 시간이 너무 오래 걸리는 것 같아서 검색해봤다.

https://stackoverflow.com/questions/5142753/can-gcc-use-multiple-cores-when-linking

 

Can gcc use multiple cores when linking?

So when compiling tons of source files with GCC one can use -j to use all available cores. But what about the linker? Is there a similar option to speed up linking or does GCC not support multi-thr...

stackoverflow.com

기본 linker 가 bfd 인데 gold 로 바꾸면 빠르다는 글을 봤다.

gold 는 abstract layer 를 제거하고 다시 설계한 linker 인가 보다.

clang 의 lld 가 gold 보다도 더 빠른 것 같다.

lld 는 파일 복사와 문자열 상수 처리를 동시에 처리해서 속도를 줄였다고 한다.

https://github.com/rui314/mold

 

GitHub - rui314/mold: Mold: A Modern Linker 🦠

Mold: A Modern Linker 🦠. Contribute to rui314/mold development by creating an account on GitHub.

github.com

조금 더 빠를 수 있는 mold / sold 도 있다.

참고로 우리 경우에는 gold 는 큰 차이 없었고 lld 는 의미있는 시간 차이를 보여줬다.

728x90

+ Recent posts