Skip to content

Add XcodeToolchain.build_settings for settings without a dedicated conf - #20256

Merged
AbrilRBS merged 13 commits into
conan-io:develop2from
czoido:xcodetoolchain-add-extra-flags
Aug 17, 2026
Merged

Add XcodeToolchain.build_settings for settings without a dedicated conf#20256
AbrilRBS merged 13 commits into
conan-io:develop2from
czoido:xcodetoolchain-add-extra-flags

Conversation

@czoido

@czoido czoido commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Changelog: Feature: XcodeToolchain now accepts arbitrary extra xcconfig settings via tc.build_settings, for build settings with no dedicated conf.
Docs: conan-io/docs#4524

Named .build_settings that is the official name Apple gives to this variables: https://developer.apple.com/documentation/xcode/build-settings-reference

There was no way for a recipe to set an Xcode-only build setting through XcodeToolchain, the way e.g. CMakeToolchain.variables lets you set arbitrary CMake variables, for example OTHER_SWIFT_FLAGS.

This adds self.build_settings, a plain dict a recipe can populate before calling tc.generate():

tc = XcodeToolchain(self)
tc.build_settings["OTHER_SWIFT_FLAGS"] = "$(inherited) -cxx-interoperability-mode=default ..."
tc.generate()

Comment thread conan/tools/apple/xcodetoolchain.py Outdated
@czoido
czoido marked this pull request as ready for review August 14, 2026 13:11

@AbrilRBS AbrilRBS left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs rebasing, but the extra xxconfig bits look good :)

@czoido czoido changed the title Add XcodeToolchain.extra_xcconfig for settings without a dedicated conf Add XcodeToolchain.build_settings for settings without a dedicated conf Aug 17, 2026
@AbrilRBS
AbrilRBS merged commit a2e01c7 into conan-io:develop2 Aug 17, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants