build: don't hardcode swift module name

This commit is contained in:
Akemi authored and Jan Ekström committed 2018-10-28 15:48:37 +02:00
1 parent eab30807fe
commit 543a3bc0bd
1 file changed
+2 -1
+2 -1
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,