-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Support compile with boringssl #2399
Merged
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
d56f48c
support boringssl
6a59cdc
add CMakeLists
ehds 3fc765c
fix
85ba921
suopport boring ssl bazel
bdc662d
fix AddBioBuffer code
20a619d
fix compile
56a90ad
add boringssl compile bazel ci
dfbabb1
set compile with boringssl as a dependent job
ehds File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,7 +95,9 @@ jobs: | |
run: | | ||
export CC=gcc && export CXX=g++ | ||
bazel build -j 12 -c opt --define with_mesalink=false --define with_glog=true --define with_thrift=true --copt -DHAVE_ZLIB=1 //... | ||
|
||
- name: compile-with-boringssl | ||
run: | | ||
bazel build -j 12 -c opt --define with_mesalink=false --define with_glog=true --define with_thrift=true --define BRPC_WITH_BORINGSSL=true --copt -DHAVE_ZLIB=1 //... | ||
|
||
clang-compile-with-make: | ||
runs-on: ubuntu-20.04 | ||
|
@@ -178,6 +180,9 @@ jobs: | |
run: | | ||
export CC=clang && export CXX=clang++ | ||
bazel build -j ${{env.proc_num}} -c opt --define with_mesalink=false --define with_glog=true --define with_thrift=true --copt -DHAVE_ZLIB=1 //... | ||
- name: compile-with-boringssl | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 同上 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done 新增 |
||
run: | | ||
bazel build -j ${{env.proc_num}} -c opt --define with_mesalink=false --define with_glog=true --define with_thrift=true --define BRPC_WITH_BORINGSSL=true --copt -DHAVE_ZLIB=1 //... | ||
|
||
clang-unittest: | ||
runs-on: ubuntu-20.04 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Usage of this module as follows: | ||
# | ||
# find_package(BORINGSSL) | ||
# | ||
# Variables used by this module, they can change the default behaviour and need | ||
# to be set before calling find_package: | ||
# | ||
# BORINGSSL_ROOT_DIR Set this variable to the root installation of | ||
# boringssl if the module has problems finding the | ||
# proper installation path. | ||
# | ||
# Variables defined by this module: | ||
# | ||
# BORINGSSL_FOUND System has boringssl, include and library dirs found | ||
# BORINGSSL_INCLUDE_DIR The boringssl include directories. | ||
# BORINGSSL_LIBRARIES The boringssl libraries. | ||
# BORINGSSL_CRYPTO_LIBRARY The boringssl crypto library. | ||
# BORINGSSL_SSL_LIBRARY The boringssl ssl library. | ||
# BORING_USE_STATIC_LIBS Whether use static library. | ||
|
||
if(BORING_USE_STATIC_LIBS) | ||
set(_boringssl_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) | ||
if(MSVC) | ||
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES}) | ||
else() | ||
set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) | ||
endif() | ||
endif() | ||
|
||
find_path(BORINGSSL_ROOT_DIR | ||
NAMES include/openssl/ssl.h include/openssl/base.h include/openssl/hkdf.h | ||
HINTS ${BORINGSSL_ROOT_DIR}) | ||
|
||
find_path(BORINGSSL_INCLUDE_DIR | ||
NAMES openssl/ssl.h openssl/base.h openssl/hkdf.h | ||
HINTS ${BORINGSSL_ROOT_DIR}/include) | ||
|
||
find_library(BORINGSSL_SSL_LIBRARY | ||
NAMES ssl | ||
HINTS ${BORINGSSL_ROOT_DIR}/lib) | ||
|
||
find_library(BORINGSSL_CRYPTO_LIBRARY | ||
NAMES crypto | ||
HINTS ${BORINGSSL_ROOT_DIR}/lib) | ||
|
||
set(BORINGSSL_LIBRARIES ${BORINGSSL_SSL_LIBRARY} ${BORINGSSL_CRYPTO_LIBRARY} | ||
CACHE STRING "BoringSSL SSL and crypto libraries" FORCE) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(BoringSSL DEFAULT_MSG | ||
BORINGSSL_LIBRARIES | ||
BORINGSSL_INCLUDE_DIR) | ||
|
||
mark_as_advanced( | ||
BORINGSSL_ROOT_DIR | ||
BORINGSSL_INCLUDE_DIR | ||
BORINGSSL_LIBRARIES | ||
BORINGSSL_CRYPTO_LIBRARY | ||
BORINGSSL_SSL_LIBRARY | ||
) | ||
|
||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_boringssl_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
加上这个step之后,gcc-compile-with-bazel-all-options的运行时间达到了1个小时
可否拆成两个并行的任务?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done 新增
gcc-compile-with-boringssl
任务