Skip to content

Commit

Permalink
meson: use swiftc instead of swift for building
Browse files Browse the repository at this point in the history
  • Loading branch information
NekoAsakura authored and Akemi committed Dec 7, 2024
1 parent 90a7892 commit 8d20b72
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -1539,7 +1539,7 @@ endif
xcrun = find_program('xcrun', required: get_option('swift-build').require(darwin))
swift_ver = '0.0'
if xcrun.found()
swift_prog = find_program(run_command(xcrun, '-find', 'swift', check: true).stdout().strip())
swift_prog = find_program(run_command(xcrun, '-find', 'swiftc', check: true).stdout().strip())
swift_ver_string = run_command(swift_prog, '-version', check: true).stdout()
verRe = '''
#!/usr/bin/env python3
Expand Down
4 changes: 2 additions & 2 deletions osdep/mac/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ header = join_paths(build_root, 'osdep/mac/swift.h')
module = join_paths(build_root, 'osdep/mac/swift.swiftmodule')
target = join_paths(build_root, 'osdep/mac/swift.o')

swift_flags = ['-frontend', '-c', '-sdk', macos_sdk_path,
'-enable-objc-interop', '-emit-objc-header', '-parse-as-library']
swift_flags = ['-c', '-emit-library', '-static', '-sdk', macos_sdk_path,
'-emit-objc-header', '-parse-as-library']

if swift_ver.version_compare('>=6.0')
swift_flags += ['-swift-version', '5']
Expand Down

0 comments on commit 8d20b72

Please sign in to comment.