Xcode: add objective C++ flags to plain C++ because Xcode requires it.

This commit is contained in:
Jussi Pakkanen 2021-04-24 19:46:36 +03:00
parent 0e4c358f35
commit 1cd80985b4
1 changed files with 3 additions and 1 deletions

View File

@ -1452,9 +1452,11 @@ class XCodeBackend(backends.Backend):
# This may break reproducible builds, in which case patches are welcome.
lang_cargs += self.get_custom_target_dir_include_args(target, compiler, absolute_path=True)
# Xcode can not handle separate compilation flags for C and ObjectiveC. They are both
# put in OTHER_CFLAGS.
# put in OTHER_CFLAGS. Same with C++ and ObjectiveC++.
if lang == 'objc':
lang = 'c'
elif lang == 'objcpp':
lang = 'cpp'
langname = LANGNAMEMAP[lang]
if langname in langargs:
langargs[langname] += args