1 #!/usr/bin/env python2.7
2 # Copyright 2015 gRPC authors.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 from __future__ import print_function
22 sys.dont_write_bytecode = True
24 boring_ssl_root = os.path.abspath(
25 os.path.join(os.path.dirname(sys.argv[0]), '../../third_party/boringssl'))
26 sys.path.append(os.path.join(boring_ssl_root, 'util'))
29 import generate_build_files
35 def map_dir(filename):
36 if filename[0:4] == 'src/':
37 return 'third_party/boringssl/' + filename[4:]
39 return 'src/boringssl/' + filename
44 return 'third_party/boringssl/' + arg
53 def WriteFiles(self, files, asm_outputs):
54 test_binaries = ['ssl_test', 'crypto_test']
58 'generated with tools/buildgen/gen_boring_ssl_build_yaml.py',
59 'raw_boringssl_build_output_for_debugging': {
61 'asm_outputs': asm_outputs,
75 map_dir(f) for f in files['ssl'] + files['crypto']),
79 # We want to include files['fips_fragments'], but not build them as objects.
80 # See https://boringssl-review.googlesource.com/c/boringssl/+/16946
81 for f in files['ssl_headers'] +
82 files['ssl_internal_headers'] +
83 files['crypto_headers'] +
84 files['crypto_internal_headers'] +
85 files['fips_fragments']),
92 'name': 'boringssl_test_util',
97 'defaults': 'boringssl',
98 'src': [map_dir(f) for f in sorted(files['test_support'])],
102 'name': 'boringssl_%s' % test,
107 'src': sorted(map_dir(f) for f in files[test]),
108 'vs_proj_dir': 'test/boringssl',
110 'defaults': 'boringssl',
112 'boringssl_test_util',
115 } for test in test_binaries],
117 'name': 'boringssl_%s' % test,
119 'exclude_configs': ['asan', 'ubsan'],
120 'ci_platforms': ['linux', 'mac', 'posix', 'windows'],
121 'platforms': ['linux', 'mac', 'posix', 'windows'],
126 'defaults': 'boringssl',
128 } for test in test_binaries]
132 os.chdir(os.path.dirname(sys.argv[0]))
135 for f in os.listdir(boring_ssl_root):
136 os.symlink(os.path.join(boring_ssl_root, f), os.path.join('src', f))
139 generate_build_files.main([g])
141 print(yaml.dump(g.yaml))