Commit Graph

25 Commits

Author SHA1 Message Date
Daniel Rodríguez Troitiño
59bf0862df [windows] Move ENABLE_EXTENDED_ALIGN_STORAGE into AddSwiftUnittest
It will apply to everything that uses add_swift_unittest and hopefully it will avoid all the problems.
2020-02-13 20:49:07 -08:00
Dario Rexin
29749e64d7 Update AddSwiftUnittests.cmake 2020-02-05 08:51:00 -08:00
Dario Rexin
ddd003fd4d Update AddSwiftUnittests.cmake 2020-02-03 13:44:27 -08:00
Dario Rexin
525f408445 Update AddSwiftUnittests.cmake 2020-02-03 11:28:22 -08:00
Dario Rexin
feb7bb1a06 one more try 2020-02-02 09:53:18 -08:00
Dario Rexin
34a331eb4d Fix march flag in unittest 2020-02-02 00:29:09 -08:00
Dario Rexin
6db05fdbca Set march for unittest on Linux 2020-02-01 23:25:31 -08:00
Saleem Abdulrasool
729ad36b80 build: delegate rpath handling to CMake
This moves the rpath handling to the build system rather than trying to
figure out the correct flags to pass to the driver.
2020-01-25 17:01:07 -08:00
Butta
796d6ade9a [android] Add support for natively building on Android
Check if building on Android through the ANDROID_DATA environment variable, then set
SWIFT_ANDROID_NATIVE_SYSROOT to the default layout for the Termux app, and key all the
include, lib, and other SDK paths off of that. The system libc and a few other libraries
are linked against from /system/lib[64]. Finally, check if lit is running natively on
Android and don't use adb if so.
2019-07-30 00:38:36 +05:30
David Zarzycki
9529a7d572 [build system] Speculative Apple lld fix 2018-01-31 13:32:08 -05:00
David Zarzycki
91823273d2 [build system] Prefer LLD if it exists (#14165)
Other changes:
1) Minimize unified versus build-script build differences.
2) Stop trying to make runtime variables have "protected" visibility.
   This combination is meaningless and lld rightly complains.

Finally, this blog post is worth reading:
http://www.airs.com/blog/archives/307
2018-01-30 07:18:36 -05:00
Hugh Bellamy
718f3ba6b0 Fix build break 2017-02-18 21:19:51 +07:00
Hugh Bellamy
15550fdc32 Don't append ".a" for LLVM/Clang/gtest dependencies on Windows 2017-02-18 16:20:31 +07:00
John McCall
038303b1b1 Switch MetadataCache to use a global slab allocator.
This seems to more than fix a performance regression that we
detected on a metadata-allocation microbenchmark.

A few months ago, I improved the metadata cache representation
and changed the metadata allocation scheme to primarily use malloc.
Previously, we'd been using malloc in the concurrent tree data
structure but a per-cache slab allocator for the metadata itself.
At the time, I was concerned about the overhead of per-cache
allocators, since many metadata patterns see only a small number
of instantiations.  That's still an important factor, so in the
new scheme we're using a global allocator; but instead of using
malloc for individual allocations, we're using a slab allocator,
which should have better peak, single-thread performance, at the
cost of not easily supporting deallocation.  Deallocation is
only used for metadata when there's contention on the cache, and
specifically only when there's contention for the same key, so
leaking a little isn't the worst thing in the world.

The initial slab is a 64K globally-allocated buffer.
Successive slabs are 16K and allocated with malloc.

rdar://28189496
2017-02-14 11:10:44 -05:00
John McCall
2b25701a93 Revert "Switch MetadataCache to use a global slab allocator."
This reverts commit ccbe5fcf73.
2017-01-29 00:17:30 -05:00
John McCall
ccbe5fcf73 Switch MetadataCache to use a global slab allocator.
This seems to more than fix a performance regression that we
detected on a metadata-allocation microbenchmark.

A few months ago, I improved the metadata cache representation
and changed the metadata allocation scheme to primarily use malloc.
Previously, we'd been using malloc in the concurrent tree data
structure but a per-cache slab allocator for the metadata itself.
At the time, I was concerned about the overhead of per-cache
allocators, since many metadata patterns see only a small number
of instantiations.  That's still an important factor, so in the
new scheme we're using a global allocator; but instead of using
malloc for individual allocations, we're using a slab allocator,
which should have better peak, single-thread performance, at the
cost of not easily supporting deallocation.  Deallocation is
only used for metadata when there's contention on the cache, and
specifically only when there's contention for the same key, so
leaking a little isn't the worst thing in the world.

The initial slab is a 64K globally-allocated buffer.
Successive slabs are 16K and allocated with malloc.

rdar://28189496
2017-01-28 02:37:22 -05:00
Brian Gesiak
3123b47602 [cmake] Enable IN_LIST compare policy
Enable CMake policy CMP0057, which allows `if()` statements to use the `IN_LIST`
operator. In addition, simplify several `if()` statements that used the
`list(FIND ...)` operation instead.
2016-09-28 22:35:05 -04:00
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