163 lines
4.2 KiB
Python
163 lines
4.2 KiB
Python
# Copyright 2017 Google Inc. All Rights Reserved.
|
|
{
|
|
'variables': {
|
|
'asm_target_arch%': 'none',
|
|
},
|
|
|
|
'target_defaults': {
|
|
# Turn off bad-function-cast warning, as BoringSSL violates this sometimes.
|
|
|
|
'cflags': [
|
|
'-g',
|
|
'-fPIC',
|
|
'-fvisibility=hidden',
|
|
'-Wno-bad-function-cast',
|
|
],
|
|
'cflags!': [
|
|
'-Wbad-function-cast',
|
|
],
|
|
'cflags_c': [
|
|
'-std=gnu99',
|
|
],
|
|
'cflags_c!': [
|
|
'-Wbad-function-cast',
|
|
],
|
|
|
|
'ldflags': [
|
|
'-fPIC',
|
|
],
|
|
|
|
'type': 'static_library',
|
|
'standalone_static_library': 1,
|
|
},
|
|
'targets': [
|
|
{
|
|
'target_name': 'crypto',
|
|
|
|
# Include the source file list generated by BoringSSL
|
|
'includes': ['kit/boringssl.gypi'],
|
|
|
|
'sources': [
|
|
'<@(boringssl_crypto_files)',
|
|
],
|
|
'include_dirs': [
|
|
'kit/src/include',
|
|
],
|
|
'direct_dependent_settings': {
|
|
'include_dirs': [
|
|
'kit/src/include',
|
|
],
|
|
},
|
|
|
|
'conditions': [
|
|
# This massive, nested conditional block will select the correct batch
|
|
# of assembly language files for the current OS and CPU architecture, or
|
|
# it will turn off assembly language files entirely if the
|
|
# |asm_target_arch| has been set to "none".
|
|
['asm_target_arch=="none"', {
|
|
'defines': [
|
|
'OPENSSL_NO_ASM',
|
|
],
|
|
}, { # asm_target_arch!="none"
|
|
'conditions': [
|
|
['OS=="linux" or OS=="android"', {
|
|
'conditions': [
|
|
['asm_target_arch=="x86"', {
|
|
'sources': [
|
|
'<@(boringssl_linux_x86_files)',
|
|
],
|
|
}],
|
|
['asm_target_arch=="x86-64"', {
|
|
'sources': [
|
|
'<@(boringssl_linux_x86_64_files)',
|
|
],
|
|
}],
|
|
['asm_target_arch=="arm"', {
|
|
'sources': [
|
|
'<@(boringssl_linux_arm_files)',
|
|
],
|
|
}],
|
|
['asm_target_arch=="arm64"', {
|
|
'sources': [
|
|
'<@(boringssl_linux_aarch64_files)',
|
|
],
|
|
}],
|
|
['asm_target_arch=="ppc64"', {
|
|
'sources': [
|
|
'<@(boringssl_linux_ppc64le_files)',
|
|
],
|
|
}],
|
|
],
|
|
}],
|
|
['OS=="win"', {
|
|
'conditions': [
|
|
['asm_target_arch=="x86"', {
|
|
'sources': [
|
|
'<@(boringssl_win_x86_files)',
|
|
],
|
|
}],
|
|
['asm_target_arch=="x86-64"', {
|
|
'sources': [
|
|
'<@(boringssl_win_x86_64_files)',
|
|
],
|
|
}],
|
|
],
|
|
}],
|
|
['OS=="mac"', {
|
|
'conditions': [
|
|
['asm_target_arch=="x86"', {
|
|
'sources': [
|
|
'<@(boringssl_mac_x86_files)',
|
|
],
|
|
}],
|
|
['asm_target_arch=="x86-64"', {
|
|
'sources': [
|
|
'<@(boringssl_mac_x86_64_files)',
|
|
],
|
|
}],
|
|
],
|
|
}],
|
|
['OS=="ios"', {
|
|
'conditions': [
|
|
['asm_target_arch=="arm"', {
|
|
'sources': [
|
|
'<@(boringssl_ios_arm_files)',
|
|
],
|
|
}],
|
|
['asm_target_arch=="arm64"', {
|
|
'sources': [
|
|
'<@(boringssl_ios_aarch64_files)',
|
|
],
|
|
}],
|
|
],
|
|
}],
|
|
],
|
|
}],
|
|
],
|
|
},
|
|
{
|
|
'target_name': 'legacy_ssl',
|
|
|
|
# Include the source file list generated by legacy BoringSSL
|
|
'includes': ['legacy_kit/boringssl.gypi'],
|
|
|
|
'sources': [
|
|
'<@(boringssl_crypto_files)',
|
|
'<@(boringssl_ssl_files)',
|
|
],
|
|
'include_dirs': [
|
|
'legacy_kit/src/include',
|
|
],
|
|
'direct_dependent_settings': {
|
|
'include_dirs': [
|
|
'legacy_kit/src/include',
|
|
],
|
|
},
|
|
|
|
'defines': [
|
|
'OPENSSL_NO_ASM',
|
|
],
|
|
},
|
|
],
|
|
}
|