File tree Expand file tree Collapse file tree 3 files changed +20
-5
lines changed
swift_build_support/swift_build_support/products Expand file tree Collapse file tree 3 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -459,7 +459,7 @@ def create_argument_parser():
459
459
help = 'if set, provide a fixed path for the Swift backtracer' )
460
460
461
461
option ('--compiler-vendor' , store ,
462
- choices = ['none' , 'apple' ],
462
+ choices = ['none' , 'apple' , 'swiftwasm' ],
463
463
default = defaults .COMPILER_VENDOR ,
464
464
help = 'Compiler vendor name' )
465
465
option ('--clang-compiler-version' , store ,
Original file line number Diff line number Diff line change @@ -64,6 +64,13 @@ def _compiler_vendor_flags(self):
64
64
if self .args .compiler_vendor == "none" :
65
65
return []
66
66
67
+ if self .args .compiler_vendor == "swiftwasm" :
68
+ return [
69
+ ('CLANG_VENDOR' , 'SwiftWasm' ),
70
+ ('CLANG_VENDOR_UTI' , 'org.swiftwasm.compilers.llvm.clang' ),
71
+ ('PACKAGE_VERSION' , str (self .args .clang_user_visible_version ))
72
+ ]
73
+
67
74
if self .args .compiler_vendor != "apple" :
68
75
raise RuntimeError ("Unknown compiler vendor?!" )
69
76
Original file line number Diff line number Diff line change @@ -104,14 +104,22 @@ def _compiler_vendor_flags(self):
104
104
if self .args .compiler_vendor == "none" :
105
105
return []
106
106
107
- if self .args .compiler_vendor != "apple" :
108
- raise RuntimeError ("Unknown compiler vendor?! Was build-script \
109
- updated without updating swift.py?" )
110
-
111
107
swift_compiler_version = ""
112
108
if self .args .swift_compiler_version is not None :
113
109
swift_compiler_version = self .args .swift_compiler_version
114
110
111
+ if self .args .compiler_vendor == "swiftwasm" :
112
+ return [
113
+ ('SWIFT_VENDOR' , 'SwiftWasm' ),
114
+ ('SWIFT_VENDOR_UTI' , 'org.swiftwasm.compilers.llvm.swift' ),
115
+ ('SWIFT_VERSION' , str (self .args .swift_user_visible_version )),
116
+ ('SWIFT_COMPILER_VERSION' , str (swift_compiler_version )),
117
+ ]
118
+
119
+ if self .args .compiler_vendor != "apple" :
120
+ raise RuntimeError ("Unknown compiler vendor?! Was build-script \
121
+ updated without updating swift.py?" )
122
+
115
123
return [
116
124
('SWIFT_VENDOR' , 'Apple' ),
117
125
('SWIFT_VENDOR_UTI' , 'com.apple.compilers.llvm.swift' ),
You can’t perform that action at this time.
0 commit comments