diff options
Diffstat (limited to 'waftools')
-rw-r--r-- | waftools/detections/compiler_swift.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/waftools/detections/compiler_swift.py b/waftools/detections/compiler_swift.py index 36f4f0b432..fba5964e8a 100644 --- a/waftools/detections/compiler_swift.py +++ b/waftools/detections/compiler_swift.py @@ -44,28 +44,29 @@ def __find_swift_library(ctx): ctx.end_msg(swift_library) __add_swift_library_linking_flags(ctx, swift_library) return - ctx.end_msg(None, "RED") + ctx.end_msg(False) def __find_macos_sdk(ctx): ctx.start_msg('Checking for macOS SDK') sdk = __run('xcrun --sdk macosx --show-sdk-path') - if sdk != "": + if sdk: ctx.end_msg(sdk) ctx.env.MACOS_SDK = sdk else: - ctx.end_msg(None, "RED") + ctx.end_msg(False) def __find_swift_compiler(ctx): ctx.start_msg('Checking for swift (Swift compiler)') swift = __run('xcrun -find swift') - if swift != "": + if swift: ctx.end_msg(swift) ctx.env.SWIFT = swift __add_swift_flags(ctx) __find_swift_library(ctx) else: - ctx.end_msg(None, "RED") + ctx.end_msg(False) def configure(ctx): - __find_macos_sdk(ctx) - __find_swift_compiler(ctx) + if ctx.env.DEST_OS == "darwin": + __find_macos_sdk(ctx) + __find_swift_compiler(ctx) |