Commits

Michael Gottesman committed bd9d59578b9
[lto] Do not pass in the LLVM_ENABLE_LTO flag to Swift's cmake invocation. *NOTE* We are still passing this variable into LLVM. Just not into Swift anymore. I originally passed in the variable -DLLVM_ENABLE_LTO=YES to Swift's cmake to ensure that the Swift unittests were compiled with lto. That was the wrong fix. The reason why is that if -DLLVM_ENABLE_LTO is set to YES then HandleLLVMOptions in llvm will append -flto to both CMAKE_C_FLAGS and CMAKE_CXX_FLAGS implying that -flto can not be disabled selectively. This ability to disable flto selectively is something that we need in order to lto host libraries, but not lto target libraries. Thus in this commit, we no longer pass in -DLLVM_ENABLE_LTO=YES to swift's cmake invocation. Instead we apply the lto flag to the unittest target ourselves in add_swift_unittest. rdar://24717107