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 @@ -165,16 +165,18 @@ def _compiler_vendor_flags(self):
165
165
def _version_flags (self ):
166
166
r = CMakeOptions ()
167
167
if self .args .swift_compiler_version is not None :
168
- swift_compiler_version = self .args .swift_compiler_version
169
- r .define ('SWIFT_COMPILER_VERSION' , str (swift_compiler_version ))
168
+ swift_compiler_version = str (self .args .swift_compiler_version )
169
+ r .define ('SWIFT_COMPILER_VERSION' , swift_compiler_version )
170
+ r .define ('SWIFT_TOOLCHAIN_VERSION' , "swiftlang-" + swift_compiler_version )
171
+ else :
172
+ toolchain_version = os .environ .get ('TOOLCHAIN_VERSION' )
173
+ if toolchain_version :
174
+ r .define ('SWIFT_TOOLCHAIN_VERSION' , toolchain_version )
175
+
170
176
if self .args .clang_compiler_version is not None :
171
177
clang_compiler_version = self .args .clang_compiler_version
172
178
r .define ('CLANG_COMPILER_VERSION' , str (clang_compiler_version ))
173
179
174
- toolchain_version = os .environ .get ('TOOLCHAIN_VERSION' )
175
- if toolchain_version :
176
- r .define ('SWIFT_TOOLCHAIN_VERSION' , toolchain_version )
177
-
178
180
return r
179
181
180
182
@property
You can’t perform that action at this time.
0 commit comments