From 1077401bc6a217cd84a948b1c02f2ca42a29db11 Mon Sep 17 00:00:00 2001 From: Alsey Coleman Miller Date: Thu, 3 Dec 2026 17:34:07 -0500 Subject: [PATCH 1/3] Turned swift-png's SystemZlib trait off in guest builds --- Scripts/guest.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Scripts/guest.py b/Scripts/guest.py index 43b90aa..d2f210c 100755 --- a/Scripts/guest.py +++ b/Scripts/guest.py @@ -374,8 +374,10 @@ def __init__(self, package_path, description): # Default traits guest builds leave off. swift-embedded-foundation's # FloatingPointParsingShims supplies the C parsing functions older standard # libraries call; this toolchain's parses in Swift, and the shims don't -# compile for x86_64 Apple triples, which have no Float16. -GUEST_DISABLED_TRAITS = {"FloatingPointParsingShims"} +# compile for x86_64 Apple triples, which have no Float16. swift-png's +# SystemZlib links the system's zlib, which a guest can't; without it, +# swift-png inflates with swift-zlib, in Swift. +GUEST_DISABLED_TRAITS = {"FloatingPointParsingShims", "SystemZlib"} def default_traits(manifest, requested=None): From 0b8ef6fb6928783f66d6b3e20af765ea8fd881c7 Mon Sep 17 00:00:00 2001 From: Alsey Coleman Miller Date: Thu, 3 Dec 2026 17:34:07 -0500 Subject: [PATCH 2/3] Tested that guests leave swift-png's system zlib out --- Scripts/test_guest_traits.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Scripts/test_guest_traits.py b/Scripts/test_guest_traits.py index 32b8748..21e4421 100644 --- a/Scripts/test_guest_traits.py +++ b/Scripts/test_guest_traits.py @@ -55,6 +55,17 @@ def test_guest_disabled_traits_stay_off(self): self.assertEqual(guest.default_traits(package), set()) self.assertEqual(guest.default_traits(package, {"FloatingPointParsingShims"}), set()) + def test_swift_png_inflates_in_swift(self): + # A dependent asking for swift-png's defaults still gets no system zlib, + # and the C module gated on it drops out of the build. + package = manifest( + {"default": ["SystemZlib"], "SystemZlib": []}, + [{"target": ["CSystemZlib", {"platformNames": [], "traits": ["SystemZlib"]}]}], + ) + enabled = guest.default_traits(package, {"default"}) + self.assertEqual(enabled, set()) + self.assertEqual(guest.disabled_trait_dependencies(package, enabled), {"Library": {"CSystemZlib"}}) + class TraitDependencyTests(unittest.TestCase): From 0fedd616b93362cf4980c538a30870a30555cb97 Mon Sep 17 00:00:00 2001 From: Alsey Coleman Miller Date: Thu, 3 Dec 2026 17:34:07 -0500 Subject: [PATCH 3/3] Recorded DynamicFonts building as Embedded Swift --- Documentation/Contracts/Fonts.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/Contracts/Fonts.md b/Documentation/Contracts/Fonts.md index 6b0ce73..e26bfa7 100644 --- a/Documentation/Contracts/Fonts.md +++ b/Documentation/Contracts/Fonts.md @@ -252,6 +252,6 @@ On 2026-12-03: is right to left is laid out run by run from the right; a line that mixes directions keeps its runs in logical order. Core Text's lines are ordered as Core Text orders them. -5. **Not built for Embedded yet.** `DynamicFonts` uses nothing Embedded - lacks, but the toolchain with Embedded Swift wasn't installed, so no - guest slice was built with it. +5. **Built for Embedded unchanged.** `guest.py` compiles `DynamicFonts` + and its dependencies as Embedded Swift for `linux-arm64` with Swift + 6.4.2, in the `swift:6.4` image, and needed no changes.