Skip to content

Commit

Permalink
build-script: Copy libclang_rt.a from the host toolchain for visionOS.
Browse files Browse the repository at this point in the history
During the toolchain build, when building the Swift standard library for
platforms other than macOS the `libclang_rt.a` needs to be copied out of the
host SDK. That wasn't happening for visionOS.

Resolves rdar://135023111.
  • Loading branch information
tshortli committed Sep 3, 2024
1 parent 6cb1411 commit 28aabab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stdlib/public/core/Availability.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import SwiftShims
/// interpreter doesn't currently know how to load symbols from compiler-rt.
/// Since `@_transparent` is only necessary for iOS apps, we only apply it on
/// iOS, not any other which would inherit/remap iOS availability.
#if os(iOS) && !os(xrOS)
#if os(iOS) && !os(visionOS)
@_effects(readnone)
@_transparent
public func _stdlib_isOSVersionAtLeast(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def copy_embedded_compiler_rt_builtins_from_darwin_host_toolchain(
' into the local clang build directory {}.'.format(
host_cxx_builtins_dir, dest_builtins_dir))

for _os in ['ios', 'watchos', 'tvos']:
for _os in ['ios', 'watchos', 'tvos', 'xros']:
# Copy over the device .a when necessary
lib_name = 'libclang_rt.{}.a'.format(_os)
host_lib_path = os.path.join(host_cxx_builtins_dir, lib_name)
Expand Down

0 comments on commit 28aabab

Please sign in to comment.