11 Commits
Author SHA1 Message Date
Evan Wilde 2fe5c4a31d Use full module triple for Swift modules
Install swiftmodules using the full module triple. This replaces the
CMake logic that attempts to compute the appropriate architecture using
values passed into CMake with a query to ask the compiler what the
appropriate module triple is for the given input target triple.
This is more robust mechanism and will future-proof this part of the
code against any new platforms and architectures to anything that the
Swift compiler building the project can support.

This is currently needed for the x86_64 FreeBSD bringup effort, where
the `amd64` architecture should be spelled `x86_64` in the swiftmodule
triple for the Swift compiler to find it. A surgical approach adding
another condition for amd64 FreeBSD would have less risk, but would also
require a new tag for every new platform that the `get_swift_host_arch`
didn't compute correctly or hadn't considered. The approach in the
commit will work for all new platforms. Bugs in this approach will come
from issues in the compiler when targeting the new platform and can be
fixed in the compiler without changes to Swift-Collections.
2025-07-01 10:07:59 -07:00
Neil Jones a49afbe1be add support for riscv64
(cherry picked from commit 7d18b37a95)

# Conflicts:
#	cmake/modules/SwiftSupport.cmake
2024-09-24 15:46:07 -07:00
Alastair Houghton fec5a5a630 [Build] Use SWIFT_SYSTEM_NAME rather than just lowercasing.
Lowercasing `CMAKE_SYSTEM_NAME` to find the name Swift uses for a platform
is not guaranteed to work.  Instead, use the `SWIFT_SYSTEM_NAME` variable,
which lets us override the name when building the Static SDK for Linux.

Fixes #420.
2024-09-23 11:16:41 +01:00
Yuta Saito effb33569a [CMake] Add support for WebAssembly target architectures
To repair the swift-corelibs-foundation build on WebAssembly, we need to
add support for Wasm targets to swift-collections' CMake build system.
2024-08-01 00:30:34 +00:00
Karoy Lorentey ffa4a58bc1 Update remaining copyright notices 2024-02-02 16:20:22 -08:00
Saleem Abdulrasool 5dc7a8970e build: add ARM64 to the architecture mappings for Windows
Windows uses `ARM64` for `CMAKE_SYSTEM_PROCESSOR` which does not match
the current spellings.
2023-03-02 10:59:03 -08:00
Boris Buegling 39a16a15cc [CMake] Match lowercase "aarch64"
Seems like it is also possible for "aarch64" to be spelled lowercase, this fixes building on Ubuntu on arm at least.
2021-09-13 16:30:41 -07:00
Boris Bügling 0959ba76a1 Add arm64 support to CMake build (#64)
This is pretty speculative, I just copied the `SwiftSupport.cmake` from swift-argument-parser which seems to have support for arm64.
2021-07-29 19:57:47 -07:00
Karoy Lorentey 4a4aecf0ce [CMake] swift-collections → SwiftCollections (#60)
* [CMake] swift-collections → SwiftCollections

This is an integration FIXME for SwiftPM: https://github.com/apple/swift-package-manager/pull/3595#issuecomment-875201764

* [CMake] Generate exports under cmake/modules/SwiftCollectionsConfig.cmake
2021-07-08 11:59:56 -07:00
3405691582 57bbf14270 Changes to support OpenBSD. (#52)
* [cmake] Support amd64 architecture name.

On OpenBSD, "x86_64" is called "amd64", and therefore recognition of this
name is required for the cmake build.

* [cmake] Add missing file.

This is required since, for example, `Deque+Extras` requires
`_withContiguousStorageIfAvailable_SR14663`.

* ManagedBuffer.capacity is unavailable on OpenBSD.

ManagedBuffer requires nonstandard API to implement `capacity` and
subsequently is unavailable on OpenBSD. For portability, just use
`minimumCapacity` on this platform.
2021-06-01 13:15:07 -07:00
Saleem Abdulrasool 689c485dfe build: add a CMake based build system (#42)
Add a CMake based build system to enable bootstrapping the toolchain
with the ability to use Swift Collections in SPM.
2021-05-21 19:54:59 -07:00