Skip to content

Minimal Swift6 support. #84

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG SWIFT_VERSION=5.9
ARG SWIFT_VERSION=6.0.3
# Other ARG declarations must follow FROM
FROM swift:${SWIFT_VERSION}

Expand Down
6 changes: 3 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
"build": {
"dockerfile": "Dockerfile",
"args": {
"SWIFT_VERSION" : "5.9",
"SWIFT_VERSION" : "6.0.3",
"HYLO_LLVM_BUILD_TYPE": "${localEnv:HYLO_LLVM_BUILD_TYPE:MinSizeRel}"
}
},
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": "false",
"username": "vscode",
"userUid": "1000",
"userGid": "1000",
"userUid": "1001",
"userGid": "1001",
"upgradePackages": "false"
},
"ghcr.io/devcontainers/features/git:1": {
Expand Down
14 changes: 2 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
- ".editorconfig"

env:
swift-version: '5.10'
swift-version: '6.0.3'

jobs:
dev-container:
Expand Down Expand Up @@ -122,20 +122,10 @@ jobs:
with:
xcode-version: latest-stable

- name: 'Set up swift (non-Windows)'
if: ${{ runner.os != 'Windows' }}
- name: 'Set up swift'
uses: SwiftyLab/setup-swift@latest
with:
swift-version: ${{ env.swift-version }}
cache-snapshot: false # Workaround for https://github.com/SwiftyLab/setup-swift/issues/315

- uses: compnerd/gha-setup-vsdevenv@main
- name: Set up swift (Windows)
if: ${{ runner.os == 'Windows' }}
uses: compnerd/[email protected]
with:
branch: swift-${{ env.swift-version }}-release
tag: ${{ env.swift-version }}-RELEASE

- name: Verify swift version
run: swift --version && swift --version | grep -q ${{ env.swift-version }}
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ project(Swifty-LLVM
)
enable_testing()
list(PREPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules)
set(CMAKE_Swift_LANGUAGE_VERSION 6)

if (PROJECT_IS_TOP_LEVEL)
include(cmake/TopLevelDefaults.cmake)
endif()
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version: 5.9
// swift-tools-version: 6.0
import PackageDescription


Expand Down
1 change: 0 additions & 1 deletion Sources/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ find_package(HyloLLVM)
include(HyloUtilities)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_Swift_LANGUAGE_VERSION 5) # Needed? Useful?

# LLVM is built this way, and we must stay compatible with it.
# TODO: Usage requirement?
Expand Down
4 changes: 2 additions & 2 deletions Sources/SwiftyLLVM/AddressSpace.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// Properties of a pointer expressed through the data layout.
public struct AddressSpace: Hashable {
public struct AddressSpace: Hashable, Sendable {

/// The LLVM representation of this instance.
public let llvm: UInt32
Expand All @@ -10,6 +10,6 @@ public struct AddressSpace: Hashable {
}

/// The default address space.
public static var `default` = AddressSpace(0)
public static let `default` = AddressSpace(0)

}
4 changes: 2 additions & 2 deletions Sources/SwiftyLLVM/Values/Constants/Intrinsic.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ extension Intrinsic {

/// The name of an intrinsic.
@dynamicMemberLookup
public struct Name {
public struct Name: Sendable {

/// The value of this instance.
public let value: String
Expand All @@ -55,6 +55,6 @@ extension Intrinsic {
}

/// The prefix of all intrinsics.
public static var llvm = Name("llvm")
public static let llvm = Name("llvm")

}
2 changes: 1 addition & 1 deletion cmake/TopLevelDefaults.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ block()
set(FETCHCONTENT_TRY_FIND_PACKAGE_MODE NEVER)
FetchContent_Declare(Hylo-CMakeModules
GIT_REPOSITORY https://github.com/hylo-lang/CMakeModules.git
GIT_TAG 6577fca
GIT_TAG c13d9d9
OVERRIDE_FIND_PACKAGE
)

Expand Down
Loading