Skip to content

Commit d7e18cb

Browse files
authored
Add 'none' to the list of available conditional compilation OS values, to support building for -none target triples (#65632)
1 parent 6051885 commit d7e18cb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/Basic/LangOptions.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ static const SupportedConditionalValue SupportedConditionalCompilationOSs[] = {
6363
"Cygwin",
6464
"Haiku",
6565
"WASI",
66+
"none",
6667
};
6768

6869
static const SupportedConditionalValue SupportedConditionalCompilationArches[] = {

test/Parse/ConditionalCompilation/basicParseErrors.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,9 @@ undefinedFunc() // expected-error {{cannot find 'undefinedFunc' in scope}}
123123
// expected-warning@-3 {{unknown operating system for build configuration 'os'}}
124124
// expected-note@-4 {{did you mean 'OSX'?}} {{27-32=OSX}}
125125
// expected-note@-5 {{did you mean 'PS4'?}} {{27-32=PS4}}
126-
// expected-warning@-6 {{unknown endianness for build configuration '_endian'}}
127-
// expected-note@-7 {{did you mean 'big'?}} {{46-50=big}}
126+
// expected-note@-6 {{did you mean 'none'?}} {{27-32=none}}
127+
// expected-warning@-7 {{unknown endianness for build configuration '_endian'}}
128+
// expected-note@-8 {{did you mean 'big'?}} {{46-50=big}}
128129
func fn_k() {}
129130
#endif
130131
fn_k()

0 commit comments

Comments
 (0)