Emit ssl_[c|cc]_sources for Bazel.
Bazel doesn't allow one to give different flags for C and C++ files, so trying to set -std=c11 for all ssl/ sources (which now include C++) blows up. This change splits the lists for Bazel so that they can be put in different cc_library targets and thus have different flags. Change-Id: I1e3dee01b6558de59246bc470527d44c9c86b188 Reviewed-on: https://boringssl-review.googlesource.com/13206 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
8d56558031
commit
feca9e562c
@ -25,7 +25,8 @@ load(
|
||||
"crypto_sources_mac_x86_64",
|
||||
"ssl_headers",
|
||||
"ssl_internal_headers",
|
||||
"ssl_sources",
|
||||
"ssl_c_sources",
|
||||
"ssl_cc_sources",
|
||||
"tool_sources",
|
||||
"tool_headers",
|
||||
)
|
||||
@ -103,11 +104,20 @@ cc_library(
|
||||
|
||||
cc_library(
|
||||
name = "ssl",
|
||||
srcs = ssl_sources + ssl_internal_headers,
|
||||
srcs = ssl_c_sources + ssl_internal_headers,
|
||||
hdrs = ssl_headers,
|
||||
copts = boringssl_copts_c11,
|
||||
includes = ["src/include"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [":crypto", ":ssl_cc"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "ssl_cc",
|
||||
srcs = ssl_cc_sources + ssl_internal_headers,
|
||||
hdrs = ssl_headers,
|
||||
copts = boringssl_copts,
|
||||
includes = ["src/include"],
|
||||
deps = [":crypto"],
|
||||
)
|
||||
|
||||
|
@ -225,6 +225,8 @@ class Bazel(object):
|
||||
self.PrintVariableSection(
|
||||
out, 'ssl_internal_headers', files['ssl_internal_headers'])
|
||||
self.PrintVariableSection(out, 'ssl_sources', files['ssl'])
|
||||
self.PrintVariableSection(out, 'ssl_c_sources', files['ssl_c'])
|
||||
self.PrintVariableSection(out, 'ssl_cc_sources', files['ssl_cc'])
|
||||
self.PrintVariableSection(out, 'crypto_headers', files['crypto_headers'])
|
||||
self.PrintVariableSection(
|
||||
out, 'crypto_internal_headers', files['crypto_internal_headers'])
|
||||
@ -624,7 +626,7 @@ def WriteAsmFiles(perlasms):
|
||||
|
||||
def main(platforms):
|
||||
crypto_c_files = FindCFiles(os.path.join('src', 'crypto'), NoTests)
|
||||
ssl_c_files = FindCFiles(os.path.join('src', 'ssl'), NoTests)
|
||||
ssl_source_files = FindCFiles(os.path.join('src', 'ssl'), NoTests)
|
||||
tool_c_files = FindCFiles(os.path.join('src', 'tool'), NoTests)
|
||||
tool_h_files = FindHeaderFiles(os.path.join('src', 'tool'), AllFiles)
|
||||
|
||||
@ -690,7 +692,9 @@ def main(platforms):
|
||||
'crypto_test': sorted(CRYPTO_TEST_SOURCES +
|
||||
['src/crypto/test/gtest_main.cc']),
|
||||
'fuzz': fuzz_c_files,
|
||||
'ssl': ssl_c_files,
|
||||
'ssl': ssl_source_files,
|
||||
'ssl_c': [s for s in ssl_source_files if s.endswith('.c')],
|
||||
'ssl_cc': [s for s in ssl_source_files if s.endswith('.cc')],
|
||||
'ssl_headers': ssl_h_files,
|
||||
'ssl_internal_headers': ssl_internal_h_files,
|
||||
'ssl_test': sorted(SSL_TEST_SOURCES + ['src/crypto/test/gtest_main.cc']),
|
||||
|
Loading…
Reference in New Issue
Block a user