Fix up header file handling.
As of a recent change, test_support always included the headers, which causes Android's new build-system to be unhappy. It doesn't want to include headers. Split them into test_support_headers and test_support to match the other keys. Then fix up references: - Android's new build system only wants the sources. Fix this. - Chromium's GN and GYP theoretically want the sources and headers, but we've never supplied the headers because this isn't enforced at all. Fix this. Headers are selected based on what target the header "belongs to". - Bazel has no change except to sort test_support_sources. Change-Id: I85809e70a71236b5e91d87f87bb73bc2ea289251 Reviewed-on: https://boringssl-review.googlesource.com/9044 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
9498e74a92
commit
c5aa8414da
@ -223,9 +223,10 @@ class Bazel(object):
|
|||||||
out.write(self.header)
|
out.write(self.header)
|
||||||
|
|
||||||
out.write('test_support_sources = [\n')
|
out.write('test_support_sources = [\n')
|
||||||
for filename in (files['test_support'] +
|
for filename in sorted(files['test_support'] +
|
||||||
files['crypto_internal_headers'] +
|
files['test_support_headers'] +
|
||||||
files['ssl_internal_headers']):
|
files['crypto_internal_headers'] +
|
||||||
|
files['ssl_internal_headers']):
|
||||||
if os.path.basename(filename) == 'malloc.cc':
|
if os.path.basename(filename) == 'malloc.cc':
|
||||||
continue
|
continue
|
||||||
out.write(' "%s",\n' % PathOf(filename))
|
out.write(' "%s",\n' % PathOf(filename))
|
||||||
@ -323,8 +324,12 @@ class GN(object):
|
|||||||
with open('BUILD.generated.gni', 'w+') as out:
|
with open('BUILD.generated.gni', 'w+') as out:
|
||||||
out.write(self.header)
|
out.write(self.header)
|
||||||
|
|
||||||
self.PrintVariableSection(out, 'crypto_sources', files['crypto'])
|
self.PrintVariableSection(out, 'crypto_sources',
|
||||||
self.PrintVariableSection(out, 'ssl_sources', files['ssl'])
|
files['crypto'] + files['crypto_headers'] +
|
||||||
|
files['crypto_internal_headers'])
|
||||||
|
self.PrintVariableSection(out, 'ssl_sources',
|
||||||
|
files['ssl'] + files['ssl_headers'] +
|
||||||
|
files['ssl_internal_headers'])
|
||||||
|
|
||||||
for ((osname, arch), asm_files) in asm_outputs:
|
for ((osname, arch), asm_files) in asm_outputs:
|
||||||
self.PrintVariableSection(
|
self.PrintVariableSection(
|
||||||
@ -339,7 +344,8 @@ class GN(object):
|
|||||||
out.write(self.header)
|
out.write(self.header)
|
||||||
|
|
||||||
self.PrintVariableSection(out, '_test_support_sources',
|
self.PrintVariableSection(out, '_test_support_sources',
|
||||||
files['test_support'])
|
files['test_support'] +
|
||||||
|
files['test_support_headers'])
|
||||||
out.write('\n')
|
out.write('\n')
|
||||||
|
|
||||||
out.write('template("create_tests") {\n')
|
out.write('template("create_tests") {\n')
|
||||||
@ -393,10 +399,12 @@ class GYP(object):
|
|||||||
with open('boringssl.gypi', 'w+') as gypi:
|
with open('boringssl.gypi', 'w+') as gypi:
|
||||||
gypi.write(self.header + '{\n \'variables\': {\n')
|
gypi.write(self.header + '{\n \'variables\': {\n')
|
||||||
|
|
||||||
self.PrintVariableSection(
|
self.PrintVariableSection(gypi, 'boringssl_ssl_sources',
|
||||||
gypi, 'boringssl_ssl_sources', files['ssl'])
|
files['ssl'] + files['ssl_headers'] +
|
||||||
self.PrintVariableSection(
|
files['ssl_internal_headers'])
|
||||||
gypi, 'boringssl_crypto_sources', files['crypto'])
|
self.PrintVariableSection(gypi, 'boringssl_crypto_sources',
|
||||||
|
files['crypto'] + files['crypto_headers'] +
|
||||||
|
files['crypto_internal_headers'])
|
||||||
|
|
||||||
for ((osname, arch), asm_files) in asm_outputs:
|
for ((osname, arch), asm_files) in asm_outputs:
|
||||||
self.PrintVariableSection(gypi, 'boringssl_%s_%s_sources' %
|
self.PrintVariableSection(gypi, 'boringssl_%s_%s_sources' %
|
||||||
@ -430,8 +438,9 @@ class GYP(object):
|
|||||||
|
|
||||||
test_gypi.write(' ],\n \'variables\': {\n')
|
test_gypi.write(' ],\n \'variables\': {\n')
|
||||||
|
|
||||||
self.PrintVariableSection(
|
self.PrintVariableSection(test_gypi, 'boringssl_test_support_sources',
|
||||||
test_gypi, 'boringssl_test_support_sources', files['test_support'])
|
files['test_support'] +
|
||||||
|
files['test_support_headers'])
|
||||||
|
|
||||||
test_gypi.write(' \'boringssl_test_targets\': [\n')
|
test_gypi.write(' \'boringssl_test_targets\': [\n')
|
||||||
|
|
||||||
@ -683,7 +692,8 @@ def main(platforms):
|
|||||||
'tool': tool_c_files,
|
'tool': tool_c_files,
|
||||||
'tool_headers': tool_h_files,
|
'tool_headers': tool_h_files,
|
||||||
'test': test_c_files,
|
'test': test_c_files,
|
||||||
'test_support': test_support_h_files + test_support_c_files,
|
'test_support': test_support_c_files,
|
||||||
|
'test_support_headers': test_support_h_files,
|
||||||
'tests': tests,
|
'tests': tests,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user