Skip to content

Commit

Permalink
OpenBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
grynspan committed Jan 6, 2025
1 parent a542b54 commit 713b032
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Documentation/ABI/TestContent.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ section in built test products:
| Platform | Binary Format | Section Name |
|-|:-:|-|
| macOS, iOS, watchOS, tvOS, visionOS | Mach-O | `__DATA_CONST,__swift5_tests` |
| Linux, FreeBSD, Android | ELF | `swift5_tests` |
| Linux, FreeBSD, OpenBSD, Android | ELF | `swift5_tests` |
| WASI | WebAssembly | `swift5_tests` |
| Windows | PE/COFF | `.sw5test`[^windowsPadding] |

Expand Down
2 changes: 1 addition & 1 deletion Sources/Testing/Discovery+Platform.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private func _testContentSectionBounds() -> [SectionBounds] {
return _sectionBounds.rawValue
}

#elseif os(Linux) || os(FreeBSD) || os(Android)
#elseif os(Linux) || os(FreeBSD) || os(OpenBSD) || os(Android)
// MARK: - ELF implementation

private import SwiftShims // For MetadataSections
Expand Down
1 change: 1 addition & 0 deletions Sources/Testing/Test.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public struct Test: Sendable {
/// | watchOS | `UnsafePointer<mach_header>` |
/// | Linux, FreeBSD, Android (32-bit) | `UnsafePointer<Elf32_Ehdr>` |
/// | Linux, FreeBSD, Android (64-bit) | `UnsafePointer<Elf64_Ehdr>` |
/// | OpenBSD | `UnsafePointer<Elf_Ehdr>` |
/// | Windows | `HMODULE` |
///
/// The value of this property is distinct from the pointer returned by
Expand Down
2 changes: 1 addition & 1 deletion Sources/TestingMacros/Support/TestContentGeneration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func makeTestContentRecordDecl(named name: TokenSyntax, in typeName: TypeSyntax?
#if hasFeature(SymbolLinkageMarkers)
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || os(visionOS)
@_section("__DATA_CONST,__swift5_tests")
#elseif os(Linux) || os(FreeBSD) || os(Android) || os(WASI)
#elseif os(Linux) || os(FreeBSD) || os(OpenBSD) || os(Android) || os(WASI)
@_section("swift5_tests")
#elseif os(Windows)
@_section(".sw5test$B")
Expand Down

0 comments on commit 713b032

Please sign in to comment.