File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -254,7 +254,8 @@ Status TargetList::CreateTargetInternal(
254
254
// If we have a valid architecture, make sure the current platform is
255
255
// compatible with that architecture.
256
256
if (!prefer_platform_arch && arch.IsValid ()) {
257
- if (!platform_sp->IsCompatibleArchitecture (arch, false , nullptr )) {
257
+ ArchSpec compatible_arch;
258
+ if (!platform_sp->IsCompatibleArchitecture (arch, false , &compatible_arch)) {
258
259
platform_sp = Platform::GetPlatformForArchitecture (arch, &platform_arch);
259
260
if (!is_dummy_target && platform_sp)
260
261
debugger.GetPlatformList ().SetSelectedPlatform (platform_sp);
Original file line number Diff line number Diff line change
1
+ // -*- mode: swift; -*-
2
+ // Test that the REPL is launched with the current OS as availability target.
3
+ // REQUIRES: system-darwin
4
+
5
+ // RUN: mkdir -p %t.dir
6
+ // RUN: echo '@available(macOS '>%t.dir/NewModule.swift
7
+ // RUN: sw_vers | grep ProductVersion | cut -d : -f 2 >>%t.dir/NewModule.swift
8
+ // RUN: echo ', *) public let message = "Hello"' >>%t.dir/NewModule.swift
9
+ // RUN: %target-swiftc -module-name NewModule -emit-module -emit-library -o %t.dir/libNewModule%target-shared-library-suffix %t.dir/NewModule.swift
10
+
11
+ // RUN: %lldb --repl="-I%t.dir -L%t.dir -lNewModule" --repl-language swift < %s | FileCheck %s
12
+ import NewModule
13
+ message
14
+ // CHECK: $R0{{.*}}Hello
You can’t perform that action at this time.
0 commit comments