|
|
|
@ -37,16 +37,8 @@ def map_dir(filename): |
|
|
|
|
return 'third_party/boringssl-with-bazel/' + filename |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# TODO(jtattermusch): is this used at all? |
|
|
|
|
def map_testarg(arg): |
|
|
|
|
if '/' in arg: |
|
|
|
|
return 'third_party/boringssl-with-bazel/src' + arg |
|
|
|
|
else: |
|
|
|
|
return arg |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Grpc(object): |
|
|
|
|
|
|
|
|
|
"""Implements a "platform" in the sense of boringssl's generate_build_files.py""" |
|
|
|
|
yaml = None |
|
|
|
|
|
|
|
|
|
def WriteFiles(self, files, asm_outputs): |
|
|
|
@ -54,7 +46,7 @@ class Grpc(object): |
|
|
|
|
|
|
|
|
|
self.yaml = { |
|
|
|
|
'#': |
|
|
|
|
'generated with tools/buildgen/gen_boring_ssl_build_yaml.py', |
|
|
|
|
'generated with src/boringssl/gen_build_yaml.py', |
|
|
|
|
'raw_boringssl_build_output_for_debugging': { |
|
|
|
|
'files': files, |
|
|
|
|
'asm_outputs': asm_outputs, |
|
|
|
@ -134,10 +126,22 @@ try: |
|
|
|
|
for f in os.listdir(boring_ssl_root): |
|
|
|
|
os.symlink(os.path.join(boring_ssl_root, f), os.path.join('src', f)) |
|
|
|
|
|
|
|
|
|
g = Grpc() |
|
|
|
|
generate_build_files.main([g]) |
|
|
|
|
grpc_platform = Grpc() |
|
|
|
|
# We use a hack to run boringssl's util/generate_build_files.py as part of this script. |
|
|
|
|
# The call will populate "grpc_platform" with boringssl's source file metadata. |
|
|
|
|
# As a side effect this script generates err_data.c and crypto_test_data.cc (requires golang) |
|
|
|
|
# Both of these files are already available under third_party/boringssl-with-bazel |
|
|
|
|
# so we don't need to generate them again, but there's no option to disable that behavior. |
|
|
|
|
# - crypto_test_data.cc is required to run boringssl_crypto_test but we already |
|
|
|
|
# use the copy under third_party/boringssl-with-bazel so we just delete it |
|
|
|
|
# - err_data.c is currently only used by the obj-C boringssl podspec |
|
|
|
|
# TODO(jtattermusch): avoid the need to keep src/boringssl/err_data.c |
|
|
|
|
generate_build_files.main([grpc_platform]) |
|
|
|
|
|
|
|
|
|
print(yaml.dump(g.yaml)) |
|
|
|
|
print(yaml.dump(grpc_platform.yaml)) |
|
|
|
|
|
|
|
|
|
finally: |
|
|
|
|
if os.path.exists('crypto_test_data.cc'): |
|
|
|
|
os.remove('crypto_test_data.cc' |
|
|
|
|
) # we don't want this file (see comment above) |
|
|
|
|
shutil.rmtree('src') |
|
|
|
|