Commit 026ace0d authored by agl@chromium.org's avatar agl@chromium.org

BoringSSL: switch around GYP files again.

Any leak of boringssl.gyp (which included unittests) ends up pulling in base/
and breaks the WebRTC build.

However, switching targets to boringssl_lib.gypi:boringssl breaks GYP because
then there are two targets with the same name (boringssl.gyp:boringssl and
boringssl_lib.gypi:boringssl).

This change gives up and splits the unittests into a different .gyp file.

BUG=none

Review URL: https://codereview.chromium.org/447213004

Cr-Commit-Position: refs/heads/master@{#288251}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288251 0039d316-1c4b-4281-b951-d872f2087c98
parent 39ebdbb2
...@@ -218,6 +218,7 @@ ...@@ -218,6 +218,7 @@
['use_openssl==1', { ['use_openssl==1', {
'dependencies': [ 'dependencies': [
'../third_party/boringssl/boringssl.gyp:*', '../third_party/boringssl/boringssl.gyp:*',
'../third_party/boringssl/boringssl_tests.gyp:*',
], ],
}], }],
['enable_app_list==1', { ['enable_app_list==1', {
......
...@@ -3,24 +3,78 @@ ...@@ -3,24 +3,78 @@
# found in the LICENSE file. # found in the LICENSE file.
{ {
'includes': [
'boringssl_tests.gypi',
'boringssl_lib.gypi',
],
'targets': [ 'targets': [
{ {
'target_name': 'boringssl_unittests', 'target_name': 'boringssl',
'type': 'executable', 'type': '<(component)',
'includes': [
'boringssl.gypi',
],
'sources': [ 'sources': [
'boringssl_unittest.cc', '<@(boringssl_lib_sources)',
], ],
'dependencies': [ 'defines': [ 'BORINGSSL_IMPLEMENTATION' ],
'<@(boringssl_test_targets)', 'conditions': [
'../../base/base.gyp:base', ['component == "shared_library"', {
'../../base/base.gyp:run_all_unittests', 'defines': [
'../../base/base.gyp:test_support_base', 'BORINGSSL_SHARED_LIBRARY',
'../../testing/gtest.gyp:gtest', ],
}],
['target_arch == "arm"', {
'sources': [ '<@(boringssl_linux_arm_sources)' ],
}],
['target_arch == "ia32"', {
'conditions': [
['OS == "mac"', {
'sources': [ '<@(boringssl_mac_x86_sources)' ],
}],
['OS == "linux" or OS == "android"', {
'sources': [ '<@(boringssl_linux_x86_sources)' ],
}],
['OS != "mac" and OS != "linux" and OS != "android"', {
'defines': [ 'OPENSSL_NO_ASM' ],
}],
]
}],
['target_arch == "x64"', {
'conditions': [
['OS == "mac"', {
'sources': [ '<@(boringssl_mac_x86_64_sources)' ],
}],
['OS == "linux" or OS == "android"', {
'sources': [ '<@(boringssl_linux_x86_64_sources)' ],
}],
['OS == "win"', {
'sources': [ '<@(boringssl_win_x86_64_sources)' ],
}],
['OS != "mac" and OS != "linux" and OS != "win" and OS != "android"', {
'defines': [ 'OPENSSL_NO_ASM' ],
}],
]
}],
['target_arch != "arm" and target_arch != "ia32" and target_arch != "x64"', {
'defines': [ 'OPENSSL_NO_ASM' ],
}],
],
'include_dirs': [
'src/include',
# This is for arm_arch.h, which is needed by some asm files. Since the
# asm files are generated and kept in a different directory, they
# cannot use relative paths to find this file.
'src/crypto',
], ],
'direct_dependent_settings': {
'include_dirs': [
'src/include',
],
'conditions': [
['component == "shared_library"', {
'defines': [
'BORINGSSL_SHARED_LIBRARY',
],
}],
],
},
}, },
], ],
} }
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'targets': [
{
'target_name': 'boringssl',
'type': '<(component)',
'includes': [
'boringssl.gypi',
],
'sources': [
'<@(boringssl_lib_sources)',
],
'defines': [ 'BORINGSSL_IMPLEMENTATION' ],
'conditions': [
['component == "shared_library"', {
'defines': [
'BORINGSSL_SHARED_LIBRARY',
],
}],
['target_arch == "arm"', {
'sources': [ '<@(boringssl_linux_arm_sources)' ],
}],
['target_arch == "ia32"', {
'conditions': [
['OS == "mac"', {
'sources': [ '<@(boringssl_mac_x86_sources)' ],
}],
['OS == "linux" or OS == "android"', {
'sources': [ '<@(boringssl_linux_x86_sources)' ],
}],
['OS != "mac" and OS != "linux" and OS != "android"', {
'defines': [ 'OPENSSL_NO_ASM' ],
}],
]
}],
['target_arch == "x64"', {
'conditions': [
['OS == "mac"', {
'sources': [ '<@(boringssl_mac_x86_64_sources)' ],
}],
['OS == "linux" or OS == "android"', {
'sources': [ '<@(boringssl_linux_x86_64_sources)' ],
}],
['OS == "win"', {
'sources': [ '<@(boringssl_win_x86_64_sources)' ],
}],
['OS != "mac" and OS != "linux" and OS != "win" and OS != "android"', {
'defines': [ 'OPENSSL_NO_ASM' ],
}],
]
}],
['target_arch != "arm" and target_arch != "ia32" and target_arch != "x64"', {
'defines': [ 'OPENSSL_NO_ASM' ],
}],
],
'include_dirs': [
'src/include',
# This is for arm_arch.h, which is needed by some asm files. Since the
# asm files are generated and kept in a different directory, they
# cannot use relative paths to find this file.
'src/crypto',
],
'direct_dependent_settings': {
'include_dirs': [
'src/include',
],
'conditions': [
['component == "shared_library"', {
'defines': [
'BORINGSSL_SHARED_LIBRARY',
],
}],
],
},
},
],
}
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'includes': [
'boringssl_tests.gypi',
],
'targets': [
{
'target_name': 'boringssl_unittests',
'type': 'executable',
'sources': [
'boringssl_unittest.cc',
],
'dependencies': [
'<@(boringssl_test_targets)',
'../../base/base.gyp:base',
'../../base/base.gyp:run_all_unittests',
'../../base/base.gyp:test_support_base',
'../../testing/gtest.gyp:gtest',
],
},
],
}
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
'target_name': 'boringssl_base64_test', 'target_name': 'boringssl_base64_test',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'dependencies': [
'boringssl', 'boringssl.gyp:boringssl',
], ],
'sources': [ 'sources': [
'src/crypto/base64/base64_test.c', 'src/crypto/base64/base64_test.c',
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
'target_name': 'boringssl_bio_test', 'target_name': 'boringssl_bio_test',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'dependencies': [
'boringssl', 'boringssl.gyp:boringssl',
], ],
'sources': [ 'sources': [
'src/crypto/bio/bio_test.c', 'src/crypto/bio/bio_test.c',
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
'target_name': 'boringssl_bn_test', 'target_name': 'boringssl_bn_test',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'dependencies': [
'boringssl', 'boringssl.gyp:boringssl',
], ],
'sources': [ 'sources': [
'src/crypto/bn/bn_test.c', 'src/crypto/bn/bn_test.c',
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
'target_name': 'boringssl_bytestring_test', 'target_name': 'boringssl_bytestring_test',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'dependencies': [
'boringssl', 'boringssl.gyp:boringssl',
], ],
'sources': [ 'sources': [
'src/crypto/bytestring/bytestring_test.c', 'src/crypto/bytestring/bytestring_test.c',
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
'target_name': 'boringssl_aead_test', 'target_name': 'boringssl_aead_test',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'dependencies': [
'boringssl', 'boringssl.gyp:boringssl',
], ],
'sources': [ 'sources': [
'src/crypto/cipher/aead_test.c', 'src/crypto/cipher/aead_test.c',
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
'target_name': 'boringssl_cipher_test', 'target_name': 'boringssl_cipher_test',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'dependencies': [
'boringssl', 'boringssl.gyp:boringssl',
], ],
'sources': [ 'sources': [
'src/crypto/cipher/cipher_test.c', 'src/crypto/cipher/cipher_test.c',
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
'target_name': 'boringssl_dh_test', 'target_name': 'boringssl_dh_test',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'dependencies': [
'boringssl', 'boringssl.gyp:boringssl',
], ],
'sources': [ 'sources': [
'src/crypto/dh/dh_test.c', 'src/crypto/dh/dh_test.c',
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
'target_name': 'boringssl_dsa_test', 'target_name': 'boringssl_dsa_test',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'dependencies': [
'boringssl', 'boringssl.gyp:boringssl',
], ],
'sources': [ 'sources': [
'src/crypto/dsa/dsa_test.c', 'src/crypto/dsa/dsa_test.c',
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
'target_name': 'boringssl_example_mul', 'target_name': 'boringssl_example_mul',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'dependencies': [
'boringssl', 'boringssl.gyp:boringssl',
], ],
'sources': [ 'sources': [
'src/crypto/ec/example_mul.c', 'src/crypto/ec/example_mul.c',
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
'target_name': 'boringssl_ecdsa_test', 'target_name': 'boringssl_ecdsa_test',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'dependencies': [
'boringssl', 'boringssl.gyp:boringssl',
], ],
'sources': [ 'sources': [
'src/crypto/ecdsa/ecdsa_test.c', 'src/crypto/ecdsa/ecdsa_test.c',
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
'target_name': 'boringssl_err_test', 'target_name': 'boringssl_err_test',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'dependencies': [
'boringssl', 'boringssl.gyp:boringssl',
], ],
'sources': [ 'sources': [
'src/crypto/err/err_test.c', 'src/crypto/err/err_test.c',
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
'target_name': 'boringssl_example_sign', 'target_name': 'boringssl_example_sign',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'dependencies': [
'boringssl', 'boringssl.gyp:boringssl',
], ],
'sources': [ 'sources': [
'src/crypto/evp/example_sign.c', 'src/crypto/evp/example_sign.c',
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
'target_name': 'boringssl_hmac_test', 'target_name': 'boringssl_hmac_test',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'dependencies': [
'boringssl', 'boringssl.gyp:boringssl',
], ],
'sources': [ 'sources': [
'src/crypto/hmac/hmac_test.c', 'src/crypto/hmac/hmac_test.c',
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
'target_name': 'boringssl_lhash_test', 'target_name': 'boringssl_lhash_test',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'dependencies': [
'boringssl', 'boringssl.gyp:boringssl',
], ],
'sources': [ 'sources': [
'src/crypto/lhash/lhash_test.c', 'src/crypto/lhash/lhash_test.c',
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
'target_name': 'boringssl_md5_test', 'target_name': 'boringssl_md5_test',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'dependencies': [
'boringssl', 'boringssl.gyp:boringssl',
], ],
'sources': [ 'sources': [
'src/crypto/md5/md5_test.c', 'src/crypto/md5/md5_test.c',
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
'target_name': 'boringssl_gcm_test', 'target_name': 'boringssl_gcm_test',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'dependencies': [
'boringssl', 'boringssl.gyp:boringssl',
], ],
'sources': [ 'sources': [
'src/crypto/modes/gcm_test.c', 'src/crypto/modes/gcm_test.c',
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
'target_name': 'boringssl_rsa_test', 'target_name': 'boringssl_rsa_test',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'dependencies': [
'boringssl', 'boringssl.gyp:boringssl',
], ],
'sources': [ 'sources': [
'src/crypto/rsa/rsa_test.c', 'src/crypto/rsa/rsa_test.c',
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
'target_name': 'boringssl_sha1_test', 'target_name': 'boringssl_sha1_test',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'dependencies': [
'boringssl', 'boringssl.gyp:boringssl',
], ],
'sources': [ 'sources': [
'src/crypto/sha/sha1_test.c', 'src/crypto/sha/sha1_test.c',
......
...@@ -213,7 +213,7 @@ def main(): ...@@ -213,7 +213,7 @@ def main():
'target_name': '%s', 'target_name': '%s',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'dependencies': [
'boringssl', 'boringssl.gyp:boringssl',
], ],
'sources': [ 'sources': [
'%s', '%s',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment