Skip to content

Commit 273065e

Browse files
committed
[cxx-interop] Disable cxxshim on windows until we can figure out cmakeconfig.
1 parent 3805828 commit 273065e

File tree

7 files changed

+32
-0
lines changed

7 files changed

+32
-0
lines changed

stdlib/public/Cxx/cxxshim/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
is_sdk_requested(WINDOWS swift_build_windows)
12
set(libcxxshim_modulemap_target_list)
23
foreach(sdk ${SWIFT_SDKS})
4+
if(swift_build_windows)
5+
continue()
6+
endif()
7+
38
foreach(arch ${SWIFT_SDK_${sdk}_ARCHITECTURES})
49
set(arch_suffix "${SWIFT_SDK_${sdk}_LIB_SUBDIR}-${arch}")
510
set(arch_subdir "${SWIFT_SDK_${sdk}_LIB_SUBDIR}/${arch}")

test/Interop/Cxx/class/inheritance/Inputs/functions.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
// TODO: fix cxxshim on Windows.
2+
#if defined(_WIN32)
3+
template <class From, class To>
4+
To __swift_interopStaticCast(From from) { return from; }
5+
#endif
6+
17
struct NonTrivial {
28
NonTrivial() {}
39
~NonTrivial() {}

test/Interop/Cxx/class/inheritance/functions.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
// REQUIRES: executable_test
44

55
import StdlibUnittest
6+
// TODO: fix cxxshim on Windows so it can be imported here.
7+
#if !os(Windows)
68
import CxxShim
9+
#endif
710
import Functions
811

912
var FunctionsTestSuite = TestSuite("Calling functions in base classes")

test/Interop/Cxx/foreign-reference/Inputs/pod.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33

44
#include <stdlib.h>
55
#if defined(_WIN32)
6+
// TODO: fix cxxshim on Windows.
7+
template <class From, class To>
8+
To __swift_interopStaticCast(From from) { return from; }
9+
610
inline void *operator new(size_t, void *p) { return p; }
711
#else
812
#include <new>

test/Interop/Cxx/foreign-reference/pod.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
// XFAIL: OS=windows-msvc
55

66
import StdlibUnittest
7+
// TODO: fix cxxshim on Windows so it can be imported here.
8+
#if !os(Windows)
79
import CxxShim
10+
#endif
811
import POD
912

1013
struct StructHoldingPair {

test/Interop/Cxx/operators/Inputs/member-inline.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#ifndef TEST_INTEROP_CXX_OPERATORS_INPUTS_MEMBER_INLINE_H
22
#define TEST_INTEROP_CXX_OPERATORS_INPUTS_MEMBER_INLINE_H
33

4+
// TODO: fix cxxshim on Windows.
5+
#if defined(_WIN32)
6+
template <class From, class To>
7+
To __swift_interopStaticCast(From from) { return from; }
8+
#endif
9+
410
struct LoadableIntWrapper {
511
int value;
612
LoadableIntWrapper operator-(LoadableIntWrapper rhs) {

test/Interop/Cxx/operators/member-inline.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
// REQUIRES: executable_test
44

55
import MemberInline
6+
7+
// TODO: fix cxxshim on Windows so it can be imported here.
8+
#if !os(Windows)
69
import CxxShim
10+
#endif
11+
712
import StdlibUnittest
813

914
var OperatorsTestSuite = TestSuite("Operators")

0 commit comments

Comments
 (0)