Skip to content

Commit fc08a24

Browse files
committed
[build] Set CRT_USE_BUILTIN_OFFSETOF when building with C++ interop on Windows
Without this, header fail to compile when they are used from Swift with C++ interop.
1 parent 330ed60 commit fc08a24

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/ASTGen/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ set(compile_options
109109

110110
# Necessary to avoid treating IBOutlet and IBAction as keywords
111111
"SHELL:-Xcc -UIBOutlet -Xcc -UIBAction -Xcc -UIBInspectable"
112+
113+
"SHELL:-Xcc -D_CRT_USE_BUILTIN_OFFSETOF"
112114
)
113115

114116
if(SWIFT_BUILD_SWIFT_SYNTAX)

0 commit comments

Comments
 (0)