diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index a546b87..21b0766 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,20 +1,21 @@ -ARG SWIFT_VERSION=5.9 +ARG SWIFT_VERSION=6.1 # Other ARG declarations must follow FROM FROM swift:${SWIFT_VERSION} ARG HYLO_LLVM_BUILD_TYPE=MinSizeRel ARG HYLO_LLVM_BUILD_RELEASE=20240303-215025 ARG HYLO_LLVM_VERSION=17.0.6 +ARG CMAKE_VERSION=3.29.1 ENV HYLO_LLVM_DOWNLOAD_URL="https://github.com/hylo-lang/llvm-build/releases/download" -RUN apt install -y gnupg -RUN apt update -RUN apt install -y curl libzstd-dev libzstd1 lsb-release make ninja-build tar wget zstd software-properties-common python3-pip - -# Get a recent cmake (https://www.kitware.com//cmake-python-wheels/) -RUN if $(/usr/bin/which cmake) ; then apt purge --auto-remove cmake ; fi -RUN pip3 install --upgrade cmake +# Install the dependencies for the LLVM build. +# Note that we do cleanup in the same layer to save disk space. +RUN apt-get update && \ + apt-get install -y --no-install-recommends gnupg curl libzstd-dev libzstd1 lsb-release make \ + ninja-build tar wget zstd software-properties-common python3-pip cmake && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* # Get the LLVM builds for the host architecture RUN < String? { guard let pcp = ProcessInfo.processInfo.environment["PKG_CONFIG_PATH"] else { return nil } return pcp.split(separator: pathSeparator) - .lazy.compactMap({ try? String(contentsOfFile: "\($0)/\(package).pc") }).first + .lazy.compactMap({ try? String(contentsOfFile: "\($0)/\(package).pc", encoding: String.Encoding.utf8) }).first } /// Returns the un-quoted, un-escaped elements in the remainder of the diff --git a/Sources/SwiftyLLVM/AddressSpace.swift b/Sources/SwiftyLLVM/AddressSpace.swift index 4528b25..a5cc183 100644 --- a/Sources/SwiftyLLVM/AddressSpace.swift +++ b/Sources/SwiftyLLVM/AddressSpace.swift @@ -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 @@ -10,6 +10,6 @@ public struct AddressSpace: Hashable { } /// The default address space. - public static var `default` = AddressSpace(0) + public static let `default` = AddressSpace(0) } diff --git a/Sources/SwiftyLLVM/Values/Constants/Intrinsic.swift b/Sources/SwiftyLLVM/Values/Constants/Intrinsic.swift index 87c9efb..ab5a5c7 100644 --- a/Sources/SwiftyLLVM/Values/Constants/Intrinsic.swift +++ b/Sources/SwiftyLLVM/Values/Constants/Intrinsic.swift @@ -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 @@ -55,6 +55,6 @@ extension Intrinsic { } /// The prefix of all intrinsics. - public static var llvm = Name("llvm") + public static let llvm = Name("llvm") }