Skip to content

Add C settings to the package manifest. - #1798

Merged
grynspan merged 5 commits into
mainfrom
jgrynspan/add-c-settings-to-package
Aug 14, 2026
Merged

Add C settings to the package manifest.#1798
grynspan merged 5 commits into
mainfrom
jgrynspan/add-c-settings-to-package

Conversation

@grynspan

Copy link
Copy Markdown
Contributor

This PR adds C settings to the package manifest. This is necessary because when Swift processes a C header, it does so as C rather than as C++, and our C++ settings don't get applied.

I've also factored out setting the Swift, C, and C++ settings for all targets to a separate .map {} call so that we don't have to remember which target types have which factory function arguments and don't accidentally omit settings from new targets in the future.

CMake is not impacted.

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

This PR adds C settings to the package manifest. This is necessary because when
Swift processes a C header, it does so _as C_ rather than as C++, and our C++
settings don't get applied.

I've also factored out setting the Swift, C, and C++ settings for all targets to
a separate `.map {}` call so that we don't have to remember which target types
have which factory function arguments and don't accidentally omit settings from
new targets in the future.
@grynspan grynspan added this to the Swift 6.5.0 (main) milestone Jul 16, 2026
@grynspan grynspan self-assigned this Jul 16, 2026
@grynspan grynspan added the enhancement New feature or request label Jul 16, 2026
@grynspan grynspan added the build 🧱 Affects the project's build configuration or process label Jul 16, 2026
@grynspan
grynspan requested a review from harlanhaskins as a code owner July 16, 2026 15:22
Comment thread Package.swift Outdated
@grynspan
grynspan requested a review from stmontgomery July 30, 2026 19:53
@grynspan
grynspan merged commit f3a65f8 into main Aug 14, 2026
27 checks passed
@grynspan
grynspan deleted the jgrynspan/add-c-settings-to-package branch August 14, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build 🧱 Affects the project's build configuration or process enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants