build: enable swift debug information when requested

This commit is contained in:
Rodger Combs 2019-03-12 21:00:14 -05:00 committed by Akemi
parent d6ca985831
commit ec0b5e527b
1 changed files with 3 additions and 0 deletions

View File

@ -23,6 +23,9 @@ def __add_swift_flags(ctx):
if major >= 3 and minor >= 1 or major >= 4:
ctx.env.SWIFT_FLAGS.extend([ "-swift-version", "3" ])
if ctx.is_debug_build():
ctx.env.SWIFT_FLAGS.append("-g")
if ctx.is_optimization():
ctx.env.SWIFT_FLAGS.append("-O")