File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
utils/swift_build_support/swift_build_support/products Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -167,16 +167,18 @@ def _compiler_vendor_flags(self):
167
167
def _version_flags (self ):
168
168
r = CMakeOptions ()
169
169
if self .args .swift_compiler_version is not None :
170
- swift_compiler_version = self .args .swift_compiler_version
171
- r .define ('SWIFT_COMPILER_VERSION' , str (swift_compiler_version ))
170
+ swift_compiler_version = str (self .args .swift_compiler_version )
171
+ r .define ('SWIFT_COMPILER_VERSION' , swift_compiler_version )
172
+ r .define ('SWIFT_TOOLCHAIN_VERSION' , "swiftlang-" + swift_compiler_version )
173
+ else :
174
+ toolchain_version = os .environ .get ('TOOLCHAIN_VERSION' )
175
+ if toolchain_version :
176
+ r .define ('SWIFT_TOOLCHAIN_VERSION' , toolchain_version )
177
+
172
178
if self .args .clang_compiler_version is not None :
173
179
clang_compiler_version = self .args .clang_compiler_version
174
180
r .define ('CLANG_COMPILER_VERSION' , str (clang_compiler_version ))
175
181
176
- toolchain_version = os .environ .get ('TOOLCHAIN_VERSION' )
177
- if toolchain_version :
178
- r .define ('SWIFT_TOOLCHAIN_VERSION' , toolchain_version )
179
-
180
182
return r
181
183
182
184
@property
You can’t perform that action at this time.
0 commit comments