Unified · Split
| @@ -1539,7 +1539,7 @@ endif · 1538 unmodified lines | |||
| 1539 | xcrun = find_program('xcrun', required: get_option('swift-build').require(darwin)) | 1539 | xcrun = find_program('xcrun', required: get_option('swift-build').require(darwin)) |
| 1540 | swift_ver = '0.0' | 1540 | swift_ver = '0.0' |
| 1541 | if xcrun.found() | 1541 | if xcrun.found() |
| 1542 | swift_prog = find_program(run_command(xcrun, '-find', 'swift', check: true).stdout().strip()) | 1542 | swift_prog = find_program(run_command(xcrun, '-find', 'swiftc', check: true).stdout().strip()) |
| 1543 | swift_ver_string = run_command(swift_prog, '-version', check: true).stdout() | 1543 | swift_ver_string = run_command(swift_prog, '-version', check: true).stdout() |
| 1544 | verRe = ''' | 1544 | verRe = ''' |
| 1545 | #!/usr/bin/env python3 | 1545 | #!/usr/bin/env python3 |
| @@ -4,8 +4,8 @@ header = join_paths(build_root, 'osdep/mac/swift.h') · 3 unmodified lines | |||
| 4 | module = join_paths(build_root, 'osdep/mac/swift.swiftmodule') | 4 | module = join_paths(build_root, 'osdep/mac/swift.swiftmodule') |
| 5 | target = join_paths(build_root, 'osdep/mac/swift.o') | 5 | target = join_paths(build_root, 'osdep/mac/swift.o') |
| 6 | 6 | ||
| 7 | swift_flags = ['-frontend', '-c', '-sdk', macos_sdk_path, | 7 | swift_flags = ['-c', '-emit-library', '-static', '-sdk', macos_sdk_path, |
| 8 | '-enable-objc-interop', '-emit-objc-header', '-parse-as-library'] | 8 | '-emit-objc-header', '-parse-as-library'] |
| 9 | 9 | ||
| 10 | if swift_ver.version_compare('>=6.0') | 10 | if swift_ver.version_compare('>=6.0') |
| 11 | swift_flags += ['-swift-version', '5'] | 11 | swift_flags += ['-swift-version', '5'] |