Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions stdlib/public/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,11 @@ if(SWIFT_STDLIB_ENABLE_VECTOR_TYPES)
list(APPEND SWIFTLIB_EMBEDDED_GYB_SOURCES SIMDConcreteOperations.swift.gyb SIMDVectorTypes.swift.gyb)
endif()

# Freestanding and Linux builds both have failures to resolve.
if(NOT SWIFT_FREESTANDING_FLAVOR AND NOT SWIFT_HOST_VARIANT_SDK STREQUAL "LINUX")
list(APPEND SWIFTLIB_SOURCES ObjectIdentifier+DebugDescription.swift)
endif()

list(APPEND SWIFTLIB_EMBEDDED_SOURCES
EmbeddedRuntime.swift
EmbeddedStubs.swift
Expand Down Expand Up @@ -310,6 +315,10 @@ list(APPEND swift_stdlib_compile_flags "-enable-experimental-feature" "Freestand
list(APPEND swift_stdlib_compile_flags "-enable-experimental-feature" "Extern")
list(APPEND swift_stdlib_compile_flags "-enable-experimental-feature" "BitwiseCopyable")

list(APPEND swift_stdlib_compile_flags "-external-plugin-path"
"${CMAKE_BINARY_DIR}/lib/swift/host/plugins#${CMAKE_BINARY_DIR}/bin/swift-plugin-server")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this change broke cross-host builds: https://ci.swift.org/job/oss-swift-package-macos/2718/console

sandbox-exec: execvp() of '/Users/ec2-user/jenkins/workspace/oss-swift-package-macos/build/buildbot_osx/swift-macosx-arm64/bin/swift-plugin-server' failed: Bad CPU type in executable

I guess we need to use swift-plugin-server under SWIFT_NATIVE_SWIFT_TOOLS_PATH if it's specified.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, working on it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#71814

Is there a way to validate the cross-host builds from the PR?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

list(APPEND swift_stdlib_compile_flags "-enable-experimental-feature" "SymbolLinkageMarkers")

set(swift_core_incorporate_object_libraries)
list(APPEND swift_core_incorporate_object_libraries swiftRuntime)
list(APPEND swift_core_incorporate_object_libraries swiftLLVMSupport)
Expand Down
2 changes: 0 additions & 2 deletions stdlib/public/core/DebuggerSupport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,11 @@ import SwiftShims
/// and other arbitrary computation are not supported. Of note, conditional
/// logic and computed properties are not supported.
/// * Overloaded string interpolation cannot be used.
@available(SwiftStdlib 5.11, *)
@attached(memberAttribute)
public macro _DebugDescription() =
#externalMacro(module: "SwiftMacros", type: "DebugDescriptionMacro")

/// Internal-only macro. See `@_DebugDescription`.
@available(SwiftStdlib 5.11, *)
@attached(peer, names: named(_lldb_summary))
public macro _DebugDescriptionProperty(_ debugIdentifier: String, _ computedProperties: [String]) =
#externalMacro(module: "SwiftMacros", type: "_DebugDescriptionPropertyMacro")
Expand Down
3 changes: 2 additions & 1 deletion stdlib/public/core/GroupInfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@
"Mirror.swift",
"Mirrors.swift",
"ReflectionMirror.swift",
"ObjectIdentifier.swift"
"ObjectIdentifier.swift",
"ObjectIdentifier+DebugDescription.swift"
],
"Math": [
"SetAlgebra.swift",
Expand Down
20 changes: 20 additions & 0 deletions stdlib/public/core/ObjectIdentifier+DebugDescription.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

#if !$Embedded
@_DebugDescription
extension ObjectIdentifier {
var _debugDescription: String {
return "ObjectIdentifier(\(_value))"
}
}
#endif