Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
Change-Id: Idb7387e56036fb4b7cbda406b14f91b7e11759c6
  • Loading branch information
niranjanyardi committed Mar 25, 2024
1 parent 6307ba1 commit 574e26a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
5 changes: 3 additions & 2 deletions starboard/build/config/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,9 @@ config("default_compiler_flags") {
}
}

# TODO: b/329683364 - Move other flags setting the c++ standard from each
# platform's platform_configuration to this config.
# This config is intended to encapsulate all platform-specific logic for selecting the C++ standard
# version in shared code. Starboard platform-specific build code should not attempt to overload this.
# TODO: b/329683364 - Refactor the remaining related flags from each platforms platform_configuration to here.
config("default_cpp_standard") {
if ((sb_is_modular && current_toolchain == cobalt_toolchain) || is_android) {
cflags_cc = [ "-std=c++17" ]
Expand Down
12 changes: 1 addition & 11 deletions starboard/nplb/compiler_compliance/cpp20_support.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace compiler_compliance {
namespace {

// These examples are taken after referring to
// 1) The chromium C++20 allowlist:
// 1) C++20 allowlist from chromium m114 milestone branch :
// https://chromium.googlesource.com/chromium/src/+/refs/branch-heads/5735/styleguide/c++/c++-features.md
// 2) cpp reference : https://en.cppreference.com/w/cpp

Expand All @@ -35,16 +35,6 @@ void test_string_ends_with() {
bool result = std::string("foobar").ends_with("bar");
}

#if __cpp_lib_assume_aligned >= 201811L
// Test std::assume_aligned support
void test_assume_aligned(int* p) {
int* p1 = std::assume_aligned<256>(p);
}
#else
// Fallback implementation if std::assume_aligned is not supported
// Currently android platform is incapable of building std::assume_aligned.
#endif

// Test std::erase_if support
void test_erase_if() {
std::vector<char> cnt(10);
Expand Down

0 comments on commit 574e26a

Please sign in to comment.