Commit Graph

58 Commits

Author SHA1 Message Date
Michael Gottesman
06a70d3942 [cmake] Add cmake support for only applying tsan to the swift stdlib/runtime. 2016-08-03 17:53:57 -07:00
Harlan
1625d97976 Switch to llvm-profdata's pooled profdata merge (#3281) 2016-07-01 16:45:21 -07:00
swift-ci
24a5b121ee Merge pull request #3210 from compnerd/experimental-linkers 2016-06-27 23:08:16 -07:00
Saleem Abdulrasool
1baeed7c26 build: allow experimental selection of lld
Add an option which the user can specify to switch to the lld linker.  Although
this linker is still nascent, it is interesting to permit linking with this.  It
is also an alternative to the BFD linker for COFF targets.  It will allow for a
cross-compilation story for Windows on non-Windows targets.
2016-06-25 12:39:17 -07:00
Saleem Abdulrasool
ff2a0aeedf build: more stringent gold checks
This is the only site which allowed you to accidentally accept gold for targets
which are not ELFish.  For the time being, we can only add unit tests for the
host variant, so use the `SWIFT_HOST_VARIANT_SDK` to determine the target file
format.  This will make supporting cross-compiling to non-ELFish targets
simpler.
2016-06-25 12:36:17 -07:00
Michael Gottesman
ee08987896 [lto][cmake] While chopping up patches, I lost an update to AddSwiftUnittests to use _compute_lto_flag.
rdar://24717107
2016-06-10 14:31:42 -07:00
Michael Gottesman
bd9d59578b [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
2016-06-10 01:48:36 -07:00
Michael Gottesman
b9e6adce30 [cmake] Refactor out unittest configuration logic from unittests/CMakeLists.txt => cmake/modules/AddSwiftUnittests.cmake.
rdar://24717107
2016-06-10 01:48:36 -07:00