![gcc의 -O2 옵션은 무엇을 합니까? [폐쇄]](https://linux55.com/image/136004/gcc%EC%9D%98%20-O2%20%EC%98%B5%EC%85%98%EC%9D%80%20%EB%AC%B4%EC%97%87%EC%9D%84%20%ED%95%A9%EB%8B%88%EA%B9%8C%3F%20%5B%ED%8F%90%EC%87%84%5D.png)
gcc의 -O2 옵션은 무엇을 합니까?
예를 들어.gcc -O2 file1.c -o file1.o
답변1
이 -O
옵션은 컴파일러 최적화를 활성화합니다. 에서 man gcc
:
-O2 Optimize even more. GCC performs nearly all supported
optimizations that do not involve a space-speed tradeoff. As
compared to -O, this option increases both compilation time and the
performance of the generated code.
특정 최적화 목록은 매뉴얼 페이지를 참조하십시오.