You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Helps keep the codebase free of unintentional Glibc-isms. There are also some interesting testing use cases enabled by building Swift Build using the static SDK.
letmessage="Could not locate shared object for pointer"
106
+
iflet underlyingError {
107
+
return"\(message): \(underlyingError)"
108
+
}
109
+
return message
110
+
}
111
+
112
+
@usableFromInline
113
+
internalinit(underlyingError:(anyError)?){
114
+
self.underlyingError = underlyingError
115
+
}
116
+
}
117
+
105
118
// Library handles just store an opaque reference to the dlopen/LoadLibrary-returned pointer, and so are Sendable in practice based on how they are used.
// Compute the path to the clang ASan dylib to use when launching the ASan variant of SWBBuildService.
169
171
// The linker adds a non-portable rpath to the directory containing the ASan dylib based on the path to the Xcode used to link the binary. We look in Bundle.main.bundlePath (SwiftBuild_asan) for .../Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/<vers>/lib/darwin so we can relaunch with the ASan library in the default toolchain of the Xcode we're part of.
170
172
// There are some examples of this rpath breaking which we've had to fix, e.g.: rdar://57759442&75222176
if !FileManager.default.isExecutableFile(atPath: asanDylib){
173
175
// We always look for the _asan variant of the build service executable since only it will have the rpaths we need to subsequently look up. However, if it's missing we should then just fall back to the normal variant.
// Check if the binary containing this class ends with _asan, in which case, we interpret this as a signal that we're running in asan mode, and that we should
0 commit comments