Skip to content

Commit

Permalink
Cherry pick PR #4007: Build BoringSSL test tool (#4025)
Browse files Browse the repository at this point in the history
Refer to the original PR: #4007

Adds GN code to always build BoringSSL test tool

b/360241262

---------

Co-authored-by: Kaido Kert <[email protected]>
  • Loading branch information
cobalt-github-releaser-bot and kaidokert authored Aug 21, 2024
1 parent ddbb355 commit fb9f6dc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
11 changes: 11 additions & 0 deletions third_party/boringssl/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,17 @@ if (!use_cobalt_customizations) {
}
}

if (is_starboard) {
target(final_executable_type, "boringssl_tool") {
testonly = true
sources = tool_sources
deps = [
":boringssl",
"//starboard:starboard_group",
]
}
}

if (build_with_chromium) {
# These targets are named "_tests" rather than "_test" to avoid colliding with
# a historical "boringssl_ssl_test" target. This works around a bug with the
Expand Down
2 changes: 2 additions & 0 deletions third_party/boringssl/src/tool/tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ int main(int argc, char **argv) {
perror("_setmode(_fileno(stderr), O_BINARY)");
return 1;
}
#elif defined(STARBOARD)
// We don't have signal() ..
#else
signal(SIGPIPE, SIG_IGN);
#endif
Expand Down
2 changes: 1 addition & 1 deletion third_party/boringssl/src/tool/transport_common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ bool Listener::Init(const std::string &port) {
// Windows' IN6ADDR_ANY_INIT does not have enough curly braces for clang-cl
// (https://crbug.com/772108), while other platforms like NaCl are missing
// in6addr_any, so use a mix of both.
#if defined(OPENSSL_WINDOWS)
#if defined(OPENSSL_WINDOWS) && !defined(STARBOARD)
addr.sin6_addr = in6addr_any;
#else
addr.sin6_addr = IN6ADDR_ANY_INIT;
Expand Down

0 comments on commit fb9f6dc

Please sign in to comment.