Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nplb compiler check for all linux based platforms #4102

Merged
merged 1 commit into from
Sep 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion starboard/nplb/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ target(gtest_target_type, "nplb") {
"window_get_size_test.cc",
]

if (!is_android) {
if (is_linux) {
# Android has a different clang version than linux.
sources +=
[ "//starboard/nplb/compiler_compliance/cpp_compiler_version_check.cc" ]
Expand Down
17 changes: 10 additions & 7 deletions starboard/nplb/compiler_compliance/cpp_compiler_version_check.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,18 @@

#include <iostream>

#define COBALT_CLANG_ERROR_MSG "We compile above Starboard targets like Cobalt, Nplb with " \
"clang17 or higher. If you are building with a non-Cobalt " \
"provided toolchain you may run into this error. To fix this error" \
"build libnplb using the Evergreen toolchain : " \
"cobalt.dev/development/setup-raspi"
niranjanyardi marked this conversation as resolved.
Show resolved Hide resolved

#ifdef __clang__
niranjanyardi marked this conversation as resolved.
Show resolved Hide resolved
// Check Clang major version required for building Nplb tests.
// Clang major version can be deduced from "clang_revision" in
// starboard/build/config/clang.gni
static_assert(
__clang_major__ >= 17,
"We compile above Starboard targets like Cobalt, Nplb with "
"clang17 or higher. If you are building with a non-Cobalt "
"provided toolchain you may run into this error. To fix this error"
"build libnplb using the Evergreen toolchain : "
"cobalt.dev/development/setup-raspi");
static_assert(__clang_major__ >= 17, COBALT_CLANG_ERROR_MSG);
#else
static_assert(false, COBALT_CLANG_ERROR_MSG);
#endif // __clang__
#undef COBALT_CLANG_ERROR_MSG
Loading