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():
459459 help = 'if set, provide a fixed path for the Swift backtracer' )
460460
461461 option ('--compiler-vendor' , store ,
462- choices = ['none' , 'apple' ],
462+ choices = ['none' , 'apple' , 'swiftwasm' ],
463463 default = defaults .COMPILER_VENDOR ,
464464 help = 'Compiler vendor name' )
465465 option ('--clang-compiler-version' , store ,
Original file line number Diff line number Diff line change @@ -64,6 +64,13 @@ def _compiler_vendor_flags(self):
6464 if self .args .compiler_vendor == "none" :
6565 return []
6666
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+
6774 if self .args .compiler_vendor != "apple" :
6875 raise RuntimeError ("Unknown compiler vendor?!" )
6976
Original file line number Diff line number Diff line change @@ -104,14 +104,22 @@ def _compiler_vendor_flags(self):
104104 if self .args .compiler_vendor == "none" :
105105 return []
106106
107- if self .args .compiler_vendor != "apple" :
108- raise RuntimeError ("Unknown compiler vendor?! Was build-script \
109- updated without updating swift.py?" )
110-
111107 swift_compiler_version = ""
112108 if self .args .swift_compiler_version is not None :
113109 swift_compiler_version = self .args .swift_compiler_version
114110
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+
115123 return [
116124 ('SWIFT_VENDOR' , 'Apple' ),
117125 ('SWIFT_VENDOR_UTI' , 'com.apple.compilers.llvm.swift' ),
You can’t perform that action at this time.
0 commit comments