File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 2795f40f33231faef9297b93c444695aa313f647
2
+ refs/heads/master: 339e84dae3a8b14fd84f9369f82a17c17f92a1d6
3
3
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
4
4
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
5
5
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
Original file line number Diff line number Diff line change @@ -800,8 +800,14 @@ AvailabilityVersionsTestSuite.test("_stdlib_isOSVersionAtLeast") {
800
800
expectTrue(isAtLeastOS(0, 1066, 0))
801
801
expectTrue(isAtLeastOS(0, 0, 1066))
802
802
803
- // 9999 is a special version that's always available
804
- expectTrue(isAtLeastOS(9999, 0, 0))
803
+ // When using a runtime that's not part of the OS, 9999 is a special version
804
+ // that's always available. The _swift_classIsSwiftMask symbol is absent in OS
805
+ // libraries, so detect based on that.
806
+ let RTLD_DEFAULT = UnsafeMutableRawPointer(bitPattern: -2)
807
+ let _swift_classIsSwiftMaskPtr = dlsym(RTLD_DEFAULT, "_swift_classIsSwiftMask")
808
+ if _swift_classIsSwiftMaskPtr != nil {
809
+ expectTrue(isAtLeastOS(9999, 0, 0))
810
+ }
805
811
#endif
806
812
}
807
813
You can’t perform that action at this time.
0 commit comments