build: don't hardcode swift module name

This commit is contained in:
Akemi 2018-10-27 17:20:57 +02:00 committed by Jan Ekström
parent eab30807fe
commit 543a3bc0bd
1 changed files with 2 additions and 1 deletions

View File

@ -147,11 +147,12 @@ def build(ctx):
tgt = task.outputs[0].abspath()
header = task.outputs[1].abspath()
module = task.outputs[2].abspath()
module_name = os.path.basename(module).rsplit(".", 1)[0]
cmd = [ ctx.env.SWIFT ]
cmd.extend(ctx.env.SWIFT_FLAGS)
cmd.extend([
"-module-name", "macOS_swift",
"-module-name", module_name,
"-emit-module-path", module,
"-import-objc-header", bridge,
"-emit-objc-header-path", header,