<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nixos/nixpkgs.git/pkgs/development/compilers/swift/wrapper, branch master</title>
<subtitle>Nix Packages collection</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/'/>
<entry>
<title>swift.swift: fix linux build</title>
<updated>2026-02-11T03:26:07+00:00</updated>
<author>
<name>David McFarland</name>
<email>corngood@gmail.com</email>
</author>
<published>2026-01-30T15:51:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=0650c7b316904fea07de0ec5f08274e9a465fe18'/>
<id>0650c7b316904fea07de0ec5f08274e9a465fe18</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>swiftPackages.swift: prefix unguarded-availability flag with -Xcc</title>
<updated>2025-11-09T07:00:27+00:00</updated>
<author>
<name>Sam</name>
<email>30577766+Samasaur1@users.noreply.github.com</email>
</author>
<published>2025-11-09T03:16:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=5b123afb9a54ab3514c113d2a8164a0f9fb245e2'/>
<id>5b123afb9a54ab3514c113d2a8164a0f9fb245e2</id>
<content type='text'>
The Swift wrapper uses a hook directly from cc-wrapper to set the
`-target` flag appropriately. This works because Clang and Swift use the
same syntax for `-target`, but there was never a guarantee that this
compatibility would be true for every option set in the hook. Indeed,
commit 369cc5c66b1efdbca2f136aa0055fedca1117304 (PR #445119) made
availability warnings into errors by setting the
`-Werror=unguarded-availability` flag in this hook, which Swift doesn't
accept at the top level. This caused all invocations of Swift to fail
with the error `unknown argument: '-Werror=unguarded-availability'` -
including the bootstrap Swift, which meant that `swiftPackages.swift`
would fail.

This commit adds all `-Werror` flags to the list of flags that need to
be prefixed with `-Xcc`. I could have just dropped the flag, since Swift
already makes this an error, but you can have C/C++ targets in Swift
packages and we'd want to pass this flag on to them. (I'm not sure
whether the clang used for those targets is already wrapped, but if it
is there is no harm done.)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Swift wrapper uses a hook directly from cc-wrapper to set the
`-target` flag appropriately. This works because Clang and Swift use the
same syntax for `-target`, but there was never a guarantee that this
compatibility would be true for every option set in the hook. Indeed,
commit 369cc5c66b1efdbca2f136aa0055fedca1117304 (PR #445119) made
availability warnings into errors by setting the
`-Werror=unguarded-availability` flag in this hook, which Swift doesn't
accept at the top level. This caused all invocations of Swift to fail
with the error `unknown argument: '-Werror=unguarded-availability'` -
including the bootstrap Swift, which meant that `swiftPackages.swift`
would fail.

This commit adds all `-Werror` flags to the list of flags that need to
be prefixed with `-Xcc`. I could have just dropped the flag, since Swift
already makes this an error, but you can have C/C++ targets in Swift
packages and we'd want to pass this flag on to them. (I'm not sure
whether the clang used for those targets is already wrapped, but if it
is there is no harm done.)
</pre>
</div>
</content>
</entry>
<entry>
<title>swiftPackages.swift: check for modern CXX interop flag in wrapper</title>
<updated>2025-10-11T02:51:06+00:00</updated>
<author>
<name>Sam</name>
<email>30577766+Samasaur1@users.noreply.github.com</email>
</author>
<published>2025-09-18T18:40:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=b2e971ac410f4757cdc7392aa36b32e927968d19'/>
<id>b2e971ac410f4757cdc7392aa36b32e927968d19</id>
<content type='text'>
This check is what determines whether the appropriate CFLAGS are set so
that Swift can find the C++ headers it needs for interop
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This check is what determines whether the appropriate CFLAGS are set so
that Swift can find the C++ headers it needs for interop
</pre>
</div>
</content>
</entry>
<entry>
<title>swiftPackages.swift{,-unwrapped}: get libc++ headers from Swift’s LLVM</title>
<updated>2025-09-02T03:14:28+00:00</updated>
<author>
<name>Emily</name>
<email>vcs@emily.moe</email>
</author>
<published>2025-08-11T14:36:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=37cad5dfd5c1a33f5e4e0b383fd1825cdac47b7c'/>
<id>37cad5dfd5c1a33f5e4e0b383fd1825cdac47b7c</id>
<content type='text'>
libc++ only supports a limited range of Clang versions, so this was
relying on the LLVM version corresponding to the one used in Swift’s
fork. Since Swift builds its own LLVM 15 anyway, we can simply install
the required libc++ headers along with it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
libc++ only supports a limited range of Clang versions, so this was
relying on the LLVM version corresponding to the one used in Swift’s
fork. Since Swift builds its own LLVM 15 anyway, we can simply install
the required libc++ headers along with it.
</pre>
</div>
</content>
</entry>
<entry>
<title>swiftPackages.swift{,-unwrapped,-driver}: ignore `$NIX_CC`</title>
<updated>2025-09-02T03:09:46+00:00</updated>
<author>
<name>Emily</name>
<email>vcs@emily.moe</email>
</author>
<published>2025-08-11T14:36:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=809f7d037c8c3a773b9f83df2fbeeef66bf00548'/>
<id>809f7d037c8c3a773b9f83df2fbeeef66bf00548</id>
<content type='text'>
Swift needs Clang to link with. The linker patch breaks linking
when using Swift with a GCC‐based standard environment.

Similarly, the internal Clang headers in the resource directory are
coupled to the corresponding version of Clang. The resource root patch
caused Swift’s Clang to use the resource directory from the version
of Clang used in the build environment, which is only compatible if
the versions match.

Instead, hard‐code the Clang path in the patches and wrappers.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Swift needs Clang to link with. The linker patch breaks linking
when using Swift with a GCC‐based standard environment.

Similarly, the internal Clang headers in the resource directory are
coupled to the corresponding version of Clang. The resource root patch
caused Swift’s Clang to use the resource directory from the version
of Clang used in the build environment, which is only compatible if
the versions match.

Instead, hard‐code the Clang path in the patches and wrappers.
</pre>
</div>
</content>
</entry>
<entry>
<title>swift.tests.cxx-interop-test: init</title>
<updated>2025-09-02T03:09:46+00:00</updated>
<author>
<name>Emily</name>
<email>vcs@emily.moe</email>
</author>
<published>2025-08-11T14:36:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=0ec026a14a57f1adbc2a4a0d904a12887aef060a'/>
<id>0ec026a14a57f1adbc2a4a0d904a12887aef060a</id>
<content type='text'>
I used this to verify the libc++ changes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I used this to verify the libc++ changes.
</pre>
</div>
</content>
</entry>
<entry>
<title>swift: source darwin-sdk-setup.bash (#360207)</title>
<updated>2024-12-28T22:13:36+00:00</updated>
<author>
<name>Emily</name>
<email>vcs@emily.moe</email>
</author>
<published>2024-12-28T22:13:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=a9ae918dccaadd28cda5e3d3e71835d5a1b19dc6'/>
<id>a9ae918dccaadd28cda5e3d3e71835d5a1b19dc6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: format all inactive Nix files</title>
<updated>2024-12-10T19:26:33+00:00</updated>
<author>
<name>Silvan Mosberger</name>
<email>silvan.mosberger@tweag.io</email>
</author>
<published>2024-12-10T19:26:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=4f0dadbf38ee4cf4cc38cbc232b7708fddf965bc'/>
<id>4f0dadbf38ee4cf4cc38cbc232b7708fddf965bc</id>
<content type='text'>
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.tar.gz \
      --argstr baseRev b32a0943687d2a5094a6d92f25a4b6e16a76b5b7
    result/bin/apply-formatting $NIXPKGS_PATH
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.tar.gz \
      --argstr baseRev b32a0943687d2a5094a6d92f25a4b6e16a76b5b7
    result/bin/apply-formatting $NIXPKGS_PATH
</pre>
</div>
</content>
</entry>
<entry>
<title>swift: source darwin-sdk-setup.bash</title>
<updated>2024-11-29T19:46:00+00:00</updated>
<author>
<name>Randy Eckenrode</name>
<email>randy@largeandhighquality.com</email>
</author>
<published>2024-11-29T19:41:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=c578c48b7f0bdecaf6c6eb6cef4678f2223b29a9'/>
<id>c578c48b7f0bdecaf6c6eb6cef4678f2223b29a9</id>
<content type='text'>
Fixes builds using xcbuild that redefine SDKROOT in the xcbuild wrapper.
SDKROOT will be set using the same logic that other wrappers use.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes builds using xcbuild that redefine SDKROOT in the xcbuild wrapper.
SDKROOT will be set using the same logic that other wrappers use.
</pre>
</div>
</content>
</entry>
<entry>
<title>swift-wrapper: set up Darwin SDK paths for Swift</title>
<updated>2024-10-10T05:07:16+00:00</updated>
<author>
<name>Randy Eckenrode</name>
<email>randy@largeandhighquality.com</email>
</author>
<published>2024-09-26T01:47:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=7d5f19a3545d88a4d8df9c588451f4fdac65339f'/>
<id>7d5f19a3545d88a4d8df9c588451f4fdac65339f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
