Open
Description
Description
This triggers on building compatibility layer for watchOS:
/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS11.5.sdk/usr/include/c++/v1/optional:830:94: note: 'value' has been explicitly marked unavailable here
830 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS constexpr value_type& value() & {
| ^
In file included from /SRCROOT/AppleLLVM/6.1.0/swift/stdlib/toolchain/Compatibility50/Overrides.cpp:17:
In file included from /SRCROOT/AppleLLVM/6.1.0/swift/stdlib/toolchain/Compatibility50/Overrides.h:17:
In file included from /SRCROOT/AppleLLVM/6.1.0/swift/include/swift/Runtime/Metadata.h:20:
In file included from /SRCROOT/AppleLLVM/6.1.0/swift/include/swift/ABI/Metadata.h:30:
In file included from /SRCROOT/AppleLLVM/6.1.0/swift/include/swift/ABI/GenericContext.h:25:
In file included from /SRCROOT/AppleLLVM/6.1.0/swift/include/swift/ABI/TrailingObjects.h:58:
/SRCROOT/AppleLLVM/6.1.0/swift/stdlib/include/llvm/Support/Alignment.h:338:20: error: 'value' is unavailable: introduced in watchOS 5.0 unknown
338 | return Lhs ? Lhs.value() / Divisor : MaybeAlign();
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS11.5.sdk/usr/include/c++/v1/optional:830:94: note: 'value' has been explicitly marked unavailable here
830 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS constexpr value_type& value() & {
| ^
4 errors generated.
This is due to previously LLVM ships its own llvm::optional implementation, but since (I believe) LLVM 16-ish llvm::optional is an alias for std::optional, which is not available in watchOS 2.0, set by
Line 629 in d0b34c2
Reproduction
Expected behavior
N/A
Environment
Swift 6.1.0, but should also trigger on ToT
Additional information
No response