Skip to content

Commit 8c6d50c

Browse files
committed
[interop][test] only run libc++ module interface printing test when the SDK has libc++
1 parent 88c8893 commit 8c6d50c

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

test/Interop/Cxx/stdlib/print-libcxx-module-interface.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// RUN: %target-swift-ide-test -print-module -module-to-print=std -I %S/Inputs -source-filename=x -enable-experimental-cxx-interop -enable-objc-interop -module-print-submodules | %FileCheck %s
22

33
// REQUIRES: OS=macosx
4+
// REQUIRES: libcxx-in-sdk
45

56
// CHECK: enum std {
67
// CHECK-NEXT: enum __1 {

test/Interop/lit.local.cfg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ clang_opt = clang_compile_opt
1212
is_cf_options_interop_updated = True
1313

1414
if config.variant_sdk and config.variant_sdk != "":
15+
# Check if libc++ is present in the SDK or not.
16+
if config.target_sdk_libcxx_path and os.path.exists(config.target_sdk_libcxx_path):
17+
config.available_features.add('libcxx-in-sdk')
18+
1519
# Check if CF_OPTIONS macro has been updated to be imported into Swift in C++ mode correctly.
1620
cf_avail_path = os.path.join(config.variant_sdk, 'System', 'Library', 'Frameworks', 'CoreFoundation.framework', 'Versions', 'A', 'Headers', 'CFAvailability.h')
1721
if os.path.exists(cf_avail_path):

0 commit comments

Comments
 (0)