Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
675a462
Add cmake 3.22.3 to recipes-devtools to fix dunfell compile
jeremy-prater Jun 23, 2025
f558eab
update layer compat from Dunfell to Scarthgap
lhoward Jun 22, 2025
3a30421
update README.md for style and to avoid Swift version dependencies
lhoward Jun 22, 2025
900e4cd
remove build.sh; this does not belong in a Yocto layer
lhoward Jun 22, 2025
806b934
explicitly specify TOOLCHAIN
lhoward Jun 22, 2025
72d77c5
determine SWIFT_GCC_VERSION by examining bitbake's context dictionary
lhoward Jun 22, 2025
c64fcf1
reformat swift-cmake-base.bbclass (indentation)
lhoward Jun 22, 2025
2223b0c
separate out Swift package resolution from build tasks
lhoward Jun 22, 2025
a3d6c89
update Swift version from 5.7.1 to 6.1.2
lhoward Jun 22, 2025
d1de1a0
libdispatch: update for Scarthgap
lhoward Jun 22, 2025
c84fd08
remove external libicu dependency
lhoward Jun 22, 2025
02f5776
swift-foundation: update for 6.1.2 and Scarthgap
lhoward Jun 23, 2025
f1a9aee
enable CF timer tolerance APIs on non-Darwin platforms
lhoward Jun 23, 2025
3c61c1a
swift-native: update for 6.1.2 and Scarthgap
lhoward Jun 22, 2025
4c86ea1
swift-stdlib: update for Swift 6.1.2 and Scarthgap
lhoward Jun 22, 2025
ce1a99e
swift-testing: add support
lhoward Jun 22, 2025
abf3127
swift-xctest: add support
lhoward Jun 22, 2025
eef9d15
add SWIFT_BUILD_TESTS option for building Swift test packages
lhoward Jun 22, 2025
108af05
consolidate tests into single swift-hello-world test
lhoward Jun 22, 2025
60c2569
fix do_fix_gcc_install_dir typos
xtremekforever Jun 22, 2025
a7b9c99
update in-tree CMake to match Scarthgap (3.28.3)
lhoward Jun 24, 2025
afb2764
update CI to use GitHub workflow on scarthgap, armv7/aarch64/x86_64
lhoward Jun 22, 2025
fc7d0c1
add Float16Support patch for armv7
xtremekforever Jun 24, 2025
ca781fa
use Amazon Linux 2, rather than Ubuntu 24.04, as native Swift toolchain
lhoward Jun 24, 2025
a875060
use C11 threading package on armv7
lhoward Jun 24, 2025
8acabed
don't assume all non-armv7 targets are aarch64
lhoward Jun 26, 2025
b732321
add clang checks to sysdeps/x86/bits/floatn.h
lhoward Jun 26, 2025
f25ce41
remove local copy of CMake 3.28.3 recipes
lhoward Jun 27, 2025
2bdd14f
fix build with 64-bit time_t/off_t on 32-bit platforms
lhoward Jun 28, 2025
470ade3
ensure tune flags are passed to clang when building Swift recipes
lhoward Jun 28, 2025
390ff01
Don't override FORTIFY_SOURCE when building Foundation
lhoward Jun 28, 2025
2489fc4
swift-testing: fix _FORTIFY_SOURCE build
lhoward Jun 28, 2025
4dc0249
remove -mbranch-protection=standard from tune args
lhoward Jun 28, 2025
9a33623
move CMake/SwiftPM common variables into swift-common.bbclass
lhoward Jun 28, 2025
b4292fc
workaround for building on x86_64: disable SSE
lhoward Jun 28, 2025
e968883
completely disable 64-bit time_t on 32-bit systems
lhoward Jun 29, 2025
2299aab
consolidate common variables between CMake and SwiftPM classes
lhoward Jun 30, 2025
a6e7ac2
use common ${SWIFT_TAG} variable
lhoward Jun 30, 2025
dbd89c4
don't set both -enforce-exclusivity=unchecked and none
lhoward Jul 1, 2025
a9e0cbe
allow Swift package resolution to be wrapped by recipes
lhoward Jul 1, 2025
55501be
call swift driver with absolute path
lhoward Jul 1, 2025
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
10 changes: 0 additions & 10 deletions .devcontainer/Dockerfile

This file was deleted.

20 changes: 0 additions & 20 deletions .devcontainer/devcontainer.json

This file was deleted.

117 changes: 96 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,100 @@
name: Build
name: build

on: [push]
on:
push:
pull_request:
workflow_dispatch:

jobs:
yocto-aarch64:
runs-on: ubuntu-24.04
container:
steps:
- name: Packages
run: |
sudo apt-get update
sudo apt install -y build-essential chrpath cpio debianutils diffstat file gawk gcc git iputils-ping libacl1 liblz4-tool locales python3 python3-git python3-jinja2 python3-pexpect python3-pip python3-subunit socat texinfo unzip wget xz-utils zstd
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
- name: Checkout Poky
uses: actions/checkout@v4
with:
repository: yoctoproject/poky
path: poky
ref: scarthgap
fetch_depth: 0
- name: Checkout Swift layer
uses: actions/checkout@v4
with:
path: poky/meta-swift
fetch_depth: 0
- name: Build
run: |
cd $GITHUB_WORKSPACE/poky
source oe-init-build-env
bitbake-layers add-layer ../meta-swift
rm -f conf/local.conf
echo 'MACHINE = "qemuarm64"' > conf/local.conf
echo 'INHERIT += "rm_work"' >> conf/local.conf
bitbake swift-hello-world

build:
name: Build
runs-on: ubuntu-latest
container: colemancda/meta-swift
strategy:
matrix:
machine: [beaglebone-yocto, qemuarm64]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: |
export SRC_ROOT=$GITHUB_WORKSPACE
export POKY_DIR=/tmp/poky
export MACHINE=${{ matrix.machine }}
cd /tmp/
git clone --branch dunfell-23.0.20-cmake-3.22.3 https://github.com/MillerTechnologyPeru/poky.git
cd $SRC_ROOT
./build.sh
yocto-armv7:
runs-on: ubuntu-24.04
container:
steps:
- name: Packages
run: |
sudo apt-get update
sudo apt install -y build-essential chrpath cpio debianutils diffstat file gawk gcc git iputils-ping libacl1 liblz4-tool locales python3 python3-git python3-jinja2 python3-pexpect python3-pip python3-subunit socat texinfo unzip wget xz-utils zstd
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
- name: Checkout Poky
uses: actions/checkout@v4
with:
repository: yoctoproject/poky
path: poky
ref: scarthgap
fetch_depth: 0
- name: Checkout Swift layer
uses: actions/checkout@v4
with:
path: poky/meta-swift
fetch_depth: 0
- name: Build
run: |
cd $GITHUB_WORKSPACE/poky
source oe-init-build-env
bitbake-layers add-layer ../meta-swift
rm -f conf/local.conf
echo 'MACHINE = "qemuarm"' > conf/local.conf
echo 'INHERIT += "rm_work"' >> conf/local.conf
bitbake swift-hello-world

yocto-x86_64:
runs-on: ubuntu-24.04
container:
steps:
- name: Packages
run: |
sudo apt-get update
sudo apt install -y build-essential chrpath cpio debianutils diffstat file gawk gcc git iputils-ping libacl1 liblz4-tool locales python3 python3-git python3-jinja2 python3-pexpect python3-pip python3-subunit socat texinfo unzip wget xz-utils zstd
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
- name: Checkout Poky
uses: actions/checkout@v4
with:
repository: yoctoproject/poky
path: poky
ref: scarthgap
fetch_depth: 0
- name: Checkout Swift layer
uses: actions/checkout@v4
with:
path: poky/meta-swift
fetch_depth: 0
- name: Build
run: |
cd $GITHUB_WORKSPACE/poky
source oe-init-build-env
bitbake-layers add-layer ../meta-swift
rm -f conf/local.conf
echo 'MACHINE = "qemux86-64"' > conf/local.conf
echo 'INHERIT += "rm_work"' >> conf/local.conf
bitbake swift-hello-world
30 changes: 0 additions & 30 deletions .gitlab-ci.yml

This file was deleted.

19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# meta-swift
Yocto meta-layer for swift-on-arm (Swift 5.7.1)

Yocto layer for the Swift programming language.

# Usage

Add this meta layer to your project (refer to yocto user manual)
Add this layer to your project (refer to Yocto user manual, or use `bitbake-layers add-layer`).

Create a new swift application and include it in your yocto build as follows...
Create a new Swift application and include it in your build as follows:

```
DESCRIPTION = "My swift 5.7.1 app"
DESCRIPTION = "My Swift app"
LICENSE = "CLOSED"

SRC_URI = "file://Sources/hello-world/main.swift \
Expand All @@ -18,14 +19,14 @@ SRC_URI = "file://Sources/hello-world/main.swift \
inherit swift
```

This does a few things, when you `inherit swift` meta-layer class, it will does the following...
When you `inherit swift` class, it does the following:

- Automatically download the x86_64 and ARMv7 swift 5.7.1 binaries and create a cross-compiling sys-root
- Add an RDEPENDS_${PN} for `swift` which is the Armv7 runtime
- Automatically download the x86\_64 SDK binaries and create a cross-compiling sysroot
- Add an RDEPENDS:${PN} for `swift`
- Performs the required build steps

# Deployment

The user of this meta-layer must provide their own `do_install` function.
The user of this layer must provide their own `do_install` function.

The finished binaries are located in ${WORKDIR}/.build/release/*
The finished binaries are located in ${BUILD\_DIR}.
23 changes: 0 additions & 23 deletions build.sh

This file was deleted.

Loading