Skip to content

Commit c194d1c

Browse files
authored
visualc: clean up the module definition
Clean up the submodules in visualc to not export all imported modules. The one special case is `vcruntime` which re-exports `SAL` due to a dependency in the headers. The import of `visualc` however will re-export all submodules to keep the current behaviour. This is required to get the ARM64 SDK building on newer MSVC toolsets.
1 parent 6491da8 commit c194d1c

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

stdlib/public/Platform/visualc.modulemap

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,23 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
module visualc [system] {
14+
export *
15+
1416
module SAL {
1517
header "sal.h"
16-
export *
1718
}
1819

1920
module vcruntime {
2021
header "vcruntime.h"
21-
export *
22+
export SAL
2223
}
2324

2425
module setjmp {
2526
header "setjmp.h"
26-
export *
2727
}
2828

2929
module stdint {
3030
header "stdint.h"
31-
export *
3231
}
3332
}
3433

stdlib/public/SwiftShims/SwiftStdint.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
// Clang has been defining __INTxx_TYPE__ macros for a long time.
2626
// __UINTxx_TYPE__ are defined only since Clang 3.5.
27-
#if !defined(__APPLE__) && !defined(__linux__) && !defined(__OpenBSD__)
27+
#if !defined(__APPLE__) && (defined(_MSC_VER) && !defined(__clang__)) && !defined(__linux__) && !defined(__OpenBSD__)
2828
#include <stdint.h>
2929
typedef int64_t __swift_int64_t;
3030
typedef uint64_t __swift_uint64_t;

0 commit comments

Comments
 (0)