From: Jan Vorlicek Date: Wed, 28 Aug 2019 00:01:52 +0000 (+0200) Subject: Unify Unix arm compiler optimization options (dotnet/coreclr#26299) X-Git-Tag: submit/tizen/20210909.063632~11030^2~706 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1d6ec100ce92a9d70e167d943fe648dd4afdf617;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Unify Unix arm compiler optimization options (dotnet/coreclr#26299) Long time ago, we were using clang 3.8 for building for Unix arm. There was a codegen bug that forced us to set optimization for release build to -O1 instead of -O3. Now the minimum clang version we use for arm is 5.0 and I've verified that binaries compiled with -O3 pass all the Coreclr pri 1 tests and so the issue is gone. So this change unifies the optimization levels for all architectures. Commit migrated from https://github.com/dotnet/coreclr/commit/a7b43df9208036ebeb56bf0cd6c498aef3692407 --- diff --git a/src/coreclr/configureoptimization.cmake b/src/coreclr/configureoptimization.cmake index dd26849..71a04e7 100644 --- a/src/coreclr/configureoptimization.cmake +++ b/src/coreclr/configureoptimization.cmake @@ -4,19 +4,8 @@ if(WIN32) add_compile_options($<$:/Ox>) add_compile_options($<$:/O2>) elseif(CLR_CMAKE_PLATFORM_UNIX) - set(CLR_CMAKE_ARM_OPTIMIZATION_FALLBACK OFF) - if(CLR_CMAKE_TARGET_ARCH STREQUAL "arm" OR CLR_CMAKE_TARGET_ARCH STREQUAL "armel") - if((CMAKE_CXX_COMPILER_ID MATCHES "Clang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.9)) - set(CLR_CMAKE_ARM_OPTIMIZATION_FALLBACK ON) - endif() - endif() add_compile_options($<$:-O0>) - if (CLR_CMAKE_ARM_OPTIMIZATION_FALLBACK) - add_compile_options($<$>:-O1>) - else() - add_compile_options($<$:-O2>) - add_compile_options($<$:-O3>) - add_compile_options($<$:-O2>) - endif() - + add_compile_options($<$:-O2>) + add_compile_options($<$:-O3>) + add_compile_options($<$:-O2>) endif()