[cmake] Disable a GCC optimization when building LLVM for MIPS
authorSimon Atanasyan <simon@atanasyan.com>
Sat, 27 Apr 2019 09:28:54 +0000 (09:28 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Sat, 27 Apr 2019 09:28:54 +0000 (09:28 +0000)
commitb82144b6e4b535fe266b0d970def849f84ff9137
treeb6986d6166efa7a5ec3e46524d4d323e958ac9e9
parentb907c442653051fde232c55907171eee05f7113e
[cmake] Disable a GCC optimization when building LLVM for MIPS

GCC when compiling LLVM for MIPS can introduce a jump to an uninitialized
value when shrink wrapping is enabled. As shrink wrapping is enabled in
GCC at all optimization levels, it must be disabled. This bug exists for
all versions of GCC since 4.9.2.

This partially resolves PR37701 / GCC PR target/86069.

Patch by Simon Dardis.

Differential Revision: https://reviews.llvm.org/D48069

llvm-svn: 359376
llvm/cmake/modules/HandleLLVMOptions.cmake