Commit Graph

11 Commits

Author SHA1 Message Date
Dario Rexin
4c0b8fa5c3 build: Don't link against libatomic on Linux
The dependency on libatomic was removed in 97df90fbf1. This commit removes leftover cases that still link against libatomic.
2020-03-02 17:34:53 -08:00
Saleem Abdulrasool
67475dced4 Driver: avoid linking against the C++ runtime
Use `clang` rather than `clang++` as the linker driver.  This ensures
that we do not force a C++ runtime on the general code.  This is fine
for now as C++ interop is not yet available for Swift.  This prevents
the accidental mix-and-match of various C++ runtimes.  This can cause
problems on platforms like android where `libstdc++` is an unsupported
runtime but is generally the default for Linux platforms.
2019-07-24 19:48:02 -07:00
Simon Evans
3b2ebeecf4 SR-8876: Always build libicu on Linux
- Uses version 61.1 from ICU Github unicode-org/icu repository.

- Updates mixin_linux_installation to add libicu option.

- Use -j when building libicu.

- When buiding ICU, use --with-library-suffix=swift
  This suffixes the ICU symbols with _swift.

  The libaries are now named libicuucswift, libicui18nswift
  and libicudataswift.

- Add the contents of uconfig.h.prepend into uconfig.h. This avoids
  passing the renaming CFLAGS to swift and swift-corelibs-foundation.

Also resolves:

SR-5618: libicu compilation should happen in parallel respecting -j.
2018-11-02 17:37:12 +00:00
Graydon Hoare
111674acdb [typo] s/plaform/platform/ everywhere. 2018-02-26 09:29:29 -08:00
Greg Parker
ae1c984920 New refcount representation (#5282)
New refcount representation and weak variable implementation. See SwiftShims/RefCount.h for details.
2017-02-24 14:19:11 -08: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
Simon Evans
ab0dbf8ddf SR-2280: swiftc -static-stdlib option fails on Linux (#5269)
- Link in static version of libicu if available in preference to
  the dynamic library when using the -static-stdlib option.
2017-01-11 19:47:41 -08:00
practicalswift
4263d03ba5 [gardening] Remove unused variable. Avoid mangling backslashes in read. 2016-12-02 01:45:17 +01:00
Simon Evans
f6866e7607 [SR-648] Update -static-stdlib option on Linux with libicu changes
- Create a file of linker arguments instead of a hardcoded
  list in ToolChains.cpp for use by -static-stdlib option
2016-11-29 13:36:19 +00:00