Skip to content

Suppress Clang error when building against Android NDK <= 25#205

Merged
danvratil merged 1 commit intomainfrom
task/204-suppress-warning-android
Dec 22, 2023
Merged

Suppress Clang error when building against Android NDK <= 25#205
danvratil merged 1 commit intomainfrom
task/204-suppress-warning-android

Conversation

@danvratil
Copy link
Collaborator

Android NDK <= 25 ships mismatching version of clang and libc++. The libc++ in the NDK is old and doesn't support coroutines, which forces us to fallback to using coroutines from std::experimental namespace. However, the clang version is newer and causes a compile error when using coroutines from std::experimental, because as of LLVM 14, coroutines are fully implemented.

To suppresss the error, we must set a special compile option. This is fixed with NDK 26, which now ships libc++ from LLVM toolchain, so the version matches the compiler version (and they updated to LLVM 17 with full coroutine support).

Resolves issue #204.

Android NDK <= 25 ships mismatching version of clang and libc++. The libc++
in the NDK is old and doesn't support coroutines, which forces us to
fallback to using coroutines from std::experimental namespace. However,
the clang version is newer and causes a compile error when using
coroutines from std::experimental, because as of LLVM 14, coroutines
are fully implemented.

To suppresss the error, we must set a special compile option. This is
fixed with NDK 26, which now ships libc++ from LLVM toolchain, so the
version matches the compiler version (and they updated to LLVM 17 with
full coroutine support).

Resolves issue #204.
@danvratil danvratil enabled auto-merge December 22, 2023 13:22
@danvratil danvratil merged commit fa70f77 into main Dec 22, 2023
@danvratil danvratil deleted the task/204-suppress-warning-android branch December 22, 2023 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant