@@ -20,12 +20,16 @@ var buildSettings: [CXXSetting] = [
20
20
. driverKit,
21
21
. android,
22
22
. linux,
23
- . wasi
24
23
] ) ) ,
25
24
. define( " U_TIMEZONE_PACKAGE " , to: " \" icutz44l \" " ) ,
25
+ . define( " U_HAVE_TZSET " , to: " 0 " , . when( platforms: [ . wasi] ) ) ,
26
+ . define( " U_HAVE_TZNAME " , to: " 0 " , . when( platforms: [ . wasi] ) ) ,
27
+ . define( " U_HAVE_TIMEZONE " , to: " 0 " , . when( platforms: [ . wasi] ) ) ,
26
28
. define( " FORTIFY_SOURCE " , to: " 2 " ) ,
27
29
. define( " STD_INSPIRED " ) ,
28
30
. define( " MAC_OS_X_VERSION_MIN_REQUIRED " , to: " 101500 " ) ,
31
+ . define( " _WASI_EMULATED_SIGNAL " , . when( platforms: [ . wasi] ) ) ,
32
+ . define( " _WASI_EMULATED_MMAN " , . when( platforms: [ . wasi] ) ) ,
29
33
. define( " U_HAVE_STRTOD_L " , to: " 1 " ) ,
30
34
. define( " U_HAVE_XLOCALE_H " , to: " 1 " ) ,
31
35
. define( " U_HAVE_STRING_VIEW " , to: " 1 " ) ,
@@ -68,6 +72,11 @@ let stubDataBuildSettings: [CXXSetting] = buildSettings.appending([
68
72
. headerSearchPath( " . " ) ,
69
73
] )
70
74
75
+ let linkerSettings : [ LinkerSetting ] = [
76
+ . linkedLibrary( " wasi-emulated-signal " , . when( platforms: [ . wasi] ) ) ,
77
+ . linkedLibrary( " wasi-emulated-mman " , . when( platforms: [ . wasi] ) ) ,
78
+ ]
79
+
71
80
let package = Package (
72
81
name: " FoundationICU " ,
73
82
products: [
@@ -112,6 +121,10 @@ let package = Package(
112
121
cxxLanguageStandard: . cxx14
113
122
)
114
123
124
+ for target in package . targets {
125
+ target. linkerSettings = linkerSettings
126
+ }
127
+
115
128
fileprivate extension Array {
116
129
func appending( _ other: Self ) -> Self {
117
130
var me = self
0 commit comments