Skip to content

Fix single-module shim macro handling - #128

Open
fallintoplace wants to merge 1 commit into
apple:mainfrom
fallintoplace:fix-single-module-shim-macro
Open

Fix single-module shim macro handling#128
fallintoplace wants to merge 1 commit into
apple:mainfrom
fallintoplace:fix-single-module-shim-macro

Conversation

@fallintoplace

Copy link
Copy Markdown

Summary

  • Normalize ATOMICS_SINGLE_MODULE and SWIFTATOMIC_SINGLE_MODULE at the top of _AtomicsShims.h before either macro is used.
  • Use ATOMICS_SINGLE_MODULE for the single-module _sa_retain_n and _sa_release_n declarations, matching the Xcode and Swift configuration name.
  • Add a focused Xcode project smoke step that exercises the unmanaged reference path under the Atomics.xcodeproj scheme.

Why

Xcode defines ATOMICS_SINGLE_MODULE, and Swift checks ATOMICS_SINGLE_MODULE, but _AtomicsShims.h checked SWIFTATOMIC_SINGLE_MODULE for the calling-convention branch. That means the intended single-module declaration path could be skipped even though the rest of the Xcode build was in single-module mode.

Notes

The smoke step uses Xcode/Atomics.xcodeproj, since that is the project configuration that defines ATOMICS_SINGLE_MODULE through Xcode/Shared.xcconfig.

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.

1 participant