diff options
| author | Katalin Rebhan <me@dblsaiko.net> | 2025-02-25 18:52:51 +0100 |
|---|---|---|
| committer | Jussi Pakkanen <jussi.pakkanen@mailbox.org> | 2025-08-02 21:45:01 +0300 |
| commit | 070579542f19196abd06beb9e67a9a9012469225 (patch) | |
| tree | 3305216cab03a446a8d4aa507b5d23e90e9e20e8 /mesonbuild/compilers/swift.py | |
| parent | eefad4a723ce63a0ac02edec7c41d69fa10b14bb (diff) | |
| download | meson-070579542f19196abd06beb9e67a9a9012469225.tar.gz | |
swift: Pass C++ base compile options to swiftc
Diffstat (limited to 'mesonbuild/compilers/swift.py')
| -rw-r--r-- | mesonbuild/compilers/swift.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/compilers/swift.py b/mesonbuild/compilers/swift.py index 89da306ab..4ad3affb5 100644 --- a/mesonbuild/compilers/swift.py +++ b/mesonbuild/compilers/swift.py @@ -140,7 +140,11 @@ class SwiftCompiler(Compiler): args += ['-swift-version', std] # Pass C compiler -std=... arg to swiftc - c_lang = first(['objc', 'c'], lambda x: x in target.compilers) + c_langs = ['objc', 'c'] + if target.uses_swift_cpp_interop(): + c_langs = ['objcpp', 'cpp', *c_langs] + + c_lang = first(c_langs, lambda x: x in target.compilers) if c_lang is not None: cc = target.compilers[c_lang] args.extend(arg for c_arg in cc.get_option_std_args(target, env, subproject) for arg in ['-Xcc', c_arg]) |
