SE-0492: Section Placement Control

For reference, Swift Testing's @Test attribute/macro currently emits code of the following form if built from a package and its client enables the SymbolLinkageMarkers experimental feature:

#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || os(visionOS)
    @_section("__DATA_CONST,__swift5_tests")
#elseif os(Linux) || os(FreeBSD) || os(OpenBSD) || os(Android) || os(WASI)
    @_section("swift5_tests")
#elseif os(Windows)
    @_section(".sw5test$B")
#else
    @__testing(warning: "Platform-specific implementation missing: test content section name unavailable")
#endif
    @_used
    private static let $s___: Testing.__TestContentRecord = (...)
3 Likes