Skip to content

Commit 660624d

Browse files
Define wasi-libc emulation macros in header directly
because it seems ClangImporter doesn't care about config_macros
1 parent 8df2a3b commit 660624d

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

CoreFoundation/Base.subproj/SwiftRuntime/CoreFoundation.h

+10
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@
2222

2323
#if !defined(CF_EXCLUDE_CSTD_HEADERS)
2424

25+
#ifndef _WASI_EMULATED_MMAN
26+
# define _WASI_EMULATED_MMAN
27+
#endif
28+
#ifndef _WASI_EMULATED_SIGNAL
29+
# define _WASI_EMULATED_SIGNAL
30+
#endif
31+
#ifndef _WASI_EMULATED_PROCESS_CLOCKS
32+
# define _WASI_EMULATED_PROCESS_CLOCKS
33+
#endif
34+
2535
#include <sys/types.h>
2636
#include <stdarg.h>
2737
#include <assert.h>

CoreFoundation/Base.subproj/static/wasm32-unknown-wasi.modulemap

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
module CoreFoundation [extern_c] [system] {
44
umbrella header "CoreFoundation.h"
55
explicit module CFPlugInCOM { header "CFPlugInCOM.h" }
6-
config_macros _WASI_EMULATED_MMAN, _WASI_EMULATED_SIGNAL, _WASI_EMULATED_PROCESS_CLOCKS
76

87
link "icui18n"
98
}

0 commit comments

Comments
 (0)