저는 LLVM 2.6과 llvm-gcc 프론트 엔드로 컴파일했던 프로젝트를 진행하고 있습니다. 나는 LLVM 3.1로 컴파일을 테스트하려고 노력하고있다.LLVM과 Clang의 최적화 수준
error: invalid value '5' in '-O5'
그러나 LLVM 2.6 LLVM-GCC는 -O5
플래그와 함께 잘 작동 한 :이했을 때 나는 -O5 최적화 레벨에 대해 다음과 같은 오류 메시지를 받았습니다. 내가 처음에하던 작업을하고있어 메이크의 -O5
가 (나는를 작성하지 않은 무엇을 알아 내려고 노력하고있어 그래서
-O0 -O1 -O2 -Os -O3 -O4
Specify which optimization level to use. -O0 means "no optimization": this level compiles the
fastest and generates the most debuggable code. -O2 is a moderate level of optimization which
enables most optimizations. -Os is like -O2 with extra optimizations to reduce code size. -O3
is like -O2, except that it enables optimizations that take longer to perform or that may
generate larger code (in an attempt to make the program run faster). On supported platforms, -O4
enables link-time optimization; object files are stored in the LLVM bitcode file format and whole
program optimization is done at link time. -O1 is somewhere between -O0 and -O2.
: 나는 연타 최적화 수준에 대한 다음 문서를 보았다 Makefile). LLVM과 함께 사용되기 위해 변경되고 사용 된 것입니까? 또는 여전히 유용한 기능이며 다른 방법으로 활성화해야합니다.
또한 경우에 내가 그 오류를주고 실행 해요 명령이 기본적으로 유용 :
/bin/clang -g -c -mcmodel=medium -fstrict-aliasing -Wstrict-aliasing -O5 -emit-llvm -fkeep-inline-functions -fno-stack-protector -c -o foo.bc foo.cpp
는 또한 케이스에 내가 리눅스 (우분투 10.04) x86_64의 시스템에서 실행하고 중요한
.