@@ -62,7 +62,8 @@ def setUp(self):
62
62
enable_experimental_concurrency = False ,
63
63
enable_experimental_distributed = False ,
64
64
build_swift_stdlib_static_print = False ,
65
- enable_experimental_string_processing = False )
65
+ enable_experimental_string_processing = False ,
66
+ swift_freestanding_is_darwin = False )
66
67
67
68
# Setup shell
68
69
shell .dry_run = True
@@ -97,7 +98,8 @@ def test_by_default_no_cmake_options(self):
97
98
'-DSWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY:BOOL=FALSE' ,
98
99
'-DSWIFT_ENABLE_EXPERIMENTAL_DISTRIBUTED:BOOL=FALSE' ,
99
100
'-DSWIFT_STDLIB_STATIC_PRINT=FALSE' ,
100
- '-DSWIFT_ENABLE_EXPERIMENTAL_STRING_PROCESSING:BOOL=FALSE'
101
+ '-DSWIFT_ENABLE_EXPERIMENTAL_STRING_PROCESSING:BOOL=FALSE' ,
102
+ '-DSWIFT_FREESTANDING_IS_DARWIN:BOOL=FALSE' ,
101
103
]
102
104
self .assertEqual (set (swift .cmake_options ), set (expected ))
103
105
@@ -117,7 +119,8 @@ def test_swift_runtime_tsan(self):
117
119
'-DSWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY:BOOL=FALSE' ,
118
120
'-DSWIFT_ENABLE_EXPERIMENTAL_DISTRIBUTED:BOOL=FALSE' ,
119
121
'-DSWIFT_STDLIB_STATIC_PRINT=FALSE' ,
120
- '-DSWIFT_ENABLE_EXPERIMENTAL_STRING_PROCESSING:BOOL=FALSE'
122
+ '-DSWIFT_ENABLE_EXPERIMENTAL_STRING_PROCESSING:BOOL=FALSE' ,
123
+ '-DSWIFT_FREESTANDING_IS_DARWIN:BOOL=FALSE' ,
121
124
]
122
125
self .assertEqual (set (swift .cmake_options ), set (flags_set ))
123
126
@@ -369,3 +372,16 @@ def test_experimental_string_processing_flags(self):
369
372
'TRUE' ],
370
373
[x for x in swift .cmake_options
371
374
if 'DSWIFT_ENABLE_EXPERIMENTAL_STRING_PROCESSING' in x ])
375
+
376
+ def test_freestanding_is_darwin_flags (self ):
377
+ self .args .swift_freestanding_is_darwin = True
378
+ swift = Swift (
379
+ args = self .args ,
380
+ toolchain = self .toolchain ,
381
+ source_dir = '/path/to/src' ,
382
+ build_dir = '/path/to/build' )
383
+ self .assertEqual (
384
+ ['-DSWIFT_FREESTANDING_IS_DARWIN:BOOL='
385
+ 'TRUE' ],
386
+ [x for x in swift .cmake_options
387
+ if 'SWIFT_FREESTANDING_IS_DARWIN' in x ])
0 commit comments