mirror of
https://github.com/chromium/crashpad.git
synced 2025-01-14 01:08:01 +08:00
Set target_name on many targets to use a crashpad_ prefix.
In Chromium, many targets are built, sharing a single output directory. Collisions are likely. When integrating Crashpad into Chromium, the ui/snapshot library and Crashpad’s snapshot library were found to conflict. This change gives most Crashpad targets a “crashpad_” prefix to avoid conflicts. All library and test targets are given a target_name with this prefix. Existing tools are not likely to conflict with anything else and are not given a prefix. BUG=crashpad:12 R=rsesek@chromium.org, scottmg@chromium.org Review URL: https://codereview.chromium.org/990553003
This commit is contained in:
parent
b770a51f2b
commit
b256df0534
@ -35,10 +35,10 @@ def main(args):
|
||||
|
||||
binary_dir = os.path.join('out', args[0])
|
||||
tests = [
|
||||
'client_test',
|
||||
'minidump_test',
|
||||
'snapshot_test',
|
||||
'util_test',
|
||||
'crashpad_client_test',
|
||||
'crashpad_minidump_test',
|
||||
'crashpad_snapshot_test',
|
||||
'crashpad_util_test',
|
||||
]
|
||||
for test in tests:
|
||||
print '-' * 80
|
||||
|
@ -18,12 +18,12 @@
|
||||
],
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'client',
|
||||
'target_name': 'crashpad_client',
|
||||
'type': 'static_library',
|
||||
'dependencies': [
|
||||
'../compat/compat.gyp:compat',
|
||||
'../compat/compat.gyp:crashpad_compat',
|
||||
'../third_party/mini_chromium/mini_chromium/base/base.gyp:base',
|
||||
'../util/util.gyp:util',
|
||||
'../util/util.gyp:crashpad_util',
|
||||
],
|
||||
'include_dirs': [
|
||||
'..',
|
||||
@ -56,16 +56,16 @@
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'client_test',
|
||||
'target_name': 'crashpad_client_test',
|
||||
'type': 'executable',
|
||||
'dependencies': [
|
||||
'client',
|
||||
'../compat/compat.gyp:compat',
|
||||
'crashpad_client',
|
||||
'../compat/compat.gyp:crashpad_compat',
|
||||
'../third_party/gtest/gtest.gyp:gtest',
|
||||
'../third_party/gtest/gtest.gyp:gtest_main',
|
||||
'../third_party/mini_chromium/mini_chromium/base/base.gyp:base',
|
||||
'../util/util.gyp:util',
|
||||
'../util/util.gyp:util_test_lib',
|
||||
'../util/util.gyp:crashpad_util',
|
||||
'../util/util.gyp:crashpad_util_test_lib',
|
||||
],
|
||||
'include_dirs': [
|
||||
'..',
|
||||
|
@ -18,7 +18,7 @@
|
||||
],
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'compat',
|
||||
'target_name': 'crashpad_compat',
|
||||
'type': 'static_library',
|
||||
'sources': [
|
||||
'mac/AvailabilityMacros.h',
|
||||
|
@ -23,13 +23,13 @@
|
||||
'target_name': 'crashpad_handler',
|
||||
'type': 'executable',
|
||||
'dependencies': [
|
||||
'../client/client.gyp:client',
|
||||
'../compat/compat.gyp:compat',
|
||||
'../minidump/minidump.gyp:minidump',
|
||||
'../snapshot/snapshot.gyp:snapshot',
|
||||
'../client/client.gyp:crashpad_client',
|
||||
'../compat/compat.gyp:crashpad_compat',
|
||||
'../minidump/minidump.gyp:crashpad_minidump',
|
||||
'../snapshot/snapshot.gyp:crashpad_snapshot',
|
||||
'../third_party/mini_chromium/mini_chromium/base/base.gyp:base',
|
||||
'../tools/tools.gyp:tool_support',
|
||||
'../util/util.gyp:util',
|
||||
'../tools/tools.gyp:crashpad_tool_support',
|
||||
'../util/util.gyp:crashpad_util',
|
||||
],
|
||||
'include_dirs': [
|
||||
'..',
|
||||
|
@ -18,16 +18,16 @@
|
||||
],
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'minidump',
|
||||
'target_name': 'crashpad_minidump',
|
||||
'type': 'static_library',
|
||||
'dependencies': [
|
||||
'../compat/compat.gyp:compat',
|
||||
'../snapshot/snapshot.gyp:snapshot',
|
||||
'../compat/compat.gyp:crashpad_compat',
|
||||
'../snapshot/snapshot.gyp:crashpad_snapshot',
|
||||
'../third_party/mini_chromium/mini_chromium/base/base.gyp:base',
|
||||
'../util/util.gyp:util',
|
||||
'../util/util.gyp:crashpad_util',
|
||||
],
|
||||
'export_dependent_settings': [
|
||||
'../compat/compat.gyp:compat',
|
||||
'../compat/compat.gyp:crashpad_compat',
|
||||
],
|
||||
'include_dirs': [
|
||||
'..',
|
||||
@ -73,11 +73,11 @@
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'minidump_test',
|
||||
'target_name': 'crashpad_minidump_test',
|
||||
'type': 'executable',
|
||||
'dependencies': [
|
||||
'minidump',
|
||||
'../snapshot/snapshot.gyp:snapshot_test_lib',
|
||||
'crashpad_minidump',
|
||||
'../snapshot/snapshot.gyp:crashpad_snapshot_test_lib',
|
||||
'../third_party/gtest/gtest.gyp:gtest',
|
||||
'../third_party/gtest/gtest.gyp:gtest_main',
|
||||
'../third_party/mini_chromium/mini_chromium/base/base.gyp:base',
|
||||
|
@ -18,13 +18,13 @@
|
||||
],
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'snapshot',
|
||||
'target_name': 'crashpad_snapshot',
|
||||
'type': 'static_library',
|
||||
'dependencies': [
|
||||
'../client/client.gyp:client',
|
||||
'../compat/compat.gyp:compat',
|
||||
'../client/client.gyp:crashpad_client',
|
||||
'../compat/compat.gyp:crashpad_compat',
|
||||
'../third_party/mini_chromium/mini_chromium/base/base.gyp:base',
|
||||
'../util/util.gyp:util',
|
||||
'../util/util.gyp:crashpad_util',
|
||||
],
|
||||
'include_dirs': [
|
||||
'..',
|
||||
@ -102,13 +102,13 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
'target_name': 'snapshot_test_lib',
|
||||
'target_name': 'crashpad_snapshot_test_lib',
|
||||
'type': 'static_library',
|
||||
'dependencies': [
|
||||
'snapshot',
|
||||
'../compat/compat.gyp:compat',
|
||||
'crashpad_snapshot',
|
||||
'../compat/compat.gyp:crashpad_compat',
|
||||
'../third_party/mini_chromium/mini_chromium/base/base.gyp:base',
|
||||
'../util/util.gyp:util',
|
||||
'../util/util.gyp:crashpad_util',
|
||||
],
|
||||
'include_dirs': [
|
||||
'..',
|
||||
@ -131,17 +131,17 @@
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'snapshot_test',
|
||||
'target_name': 'crashpad_snapshot_test',
|
||||
'type': 'executable',
|
||||
'dependencies': [
|
||||
'snapshot',
|
||||
'../client/client.gyp:client',
|
||||
'../compat/compat.gyp:compat',
|
||||
'crashpad_snapshot',
|
||||
'../client/client.gyp:crashpad_client',
|
||||
'../compat/compat.gyp:crashpad_compat',
|
||||
'../third_party/gtest/gtest.gyp:gtest',
|
||||
'../third_party/gtest/gtest.gyp:gtest_main',
|
||||
'../third_party/mini_chromium/mini_chromium/base/base.gyp:base',
|
||||
'../util/util.gyp:util',
|
||||
'../util/util.gyp:util_test_lib',
|
||||
'../util/util.gyp:crashpad_util',
|
||||
'../util/util.gyp:crashpad_util_test_lib',
|
||||
],
|
||||
'include_dirs': [
|
||||
'..',
|
||||
|
@ -47,7 +47,7 @@
|
||||
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'tool_support',
|
||||
'target_name': 'crashpad_tool_support',
|
||||
'type': 'static_library',
|
||||
'dependencies': [
|
||||
'../third_party/mini_chromium/mini_chromium/base/base.gyp:base',
|
||||
@ -64,10 +64,10 @@
|
||||
'target_name': 'catch_exception_tool',
|
||||
'type': 'executable',
|
||||
'dependencies': [
|
||||
'tool_support',
|
||||
'../compat/compat.gyp:compat',
|
||||
'crashpad_tool_support',
|
||||
'../compat/compat.gyp:crashpad_compat',
|
||||
'../third_party/mini_chromium/mini_chromium/base/base.gyp:base',
|
||||
'../util/util.gyp:util',
|
||||
'../util/util.gyp:crashpad_util',
|
||||
],
|
||||
'include_dirs': [
|
||||
'..',
|
||||
@ -80,10 +80,10 @@
|
||||
'target_name': 'exception_port_tool',
|
||||
'type': 'executable',
|
||||
'dependencies': [
|
||||
'tool_support',
|
||||
'../compat/compat.gyp:compat',
|
||||
'crashpad_tool_support',
|
||||
'../compat/compat.gyp:crashpad_compat',
|
||||
'../third_party/mini_chromium/mini_chromium/base/base.gyp:base',
|
||||
'../util/util.gyp:util',
|
||||
'../util/util.gyp:crashpad_util',
|
||||
],
|
||||
'include_dirs': [
|
||||
'..',
|
||||
@ -104,12 +104,12 @@
|
||||
'target_name': 'generate_dump',
|
||||
'type': 'executable',
|
||||
'dependencies': [
|
||||
'tool_support',
|
||||
'../compat/compat.gyp:compat',
|
||||
'../minidump/minidump.gyp:minidump',
|
||||
'../snapshot/snapshot.gyp:snapshot',
|
||||
'crashpad_tool_support',
|
||||
'../compat/compat.gyp:crashpad_compat',
|
||||
'../minidump/minidump.gyp:crashpad_minidump',
|
||||
'../snapshot/snapshot.gyp:crashpad_snapshot',
|
||||
'../third_party/mini_chromium/mini_chromium/base/base.gyp:base',
|
||||
'../util/util.gyp:util',
|
||||
'../util/util.gyp:crashpad_util',
|
||||
],
|
||||
'include_dirs': [
|
||||
'..',
|
||||
@ -130,10 +130,10 @@
|
||||
'target_name': 'on_demand_service_tool',
|
||||
'type': 'executable',
|
||||
'dependencies': [
|
||||
'tool_support',
|
||||
'../compat/compat.gyp:compat',
|
||||
'crashpad_tool_support',
|
||||
'../compat/compat.gyp:crashpad_compat',
|
||||
'../third_party/mini_chromium/mini_chromium/base/base.gyp:base',
|
||||
'../util/util.gyp:util',
|
||||
'../util/util.gyp:crashpad_util',
|
||||
],
|
||||
'include_dirs': [
|
||||
'..',
|
||||
@ -152,9 +152,9 @@
|
||||
'target_name': 'run_with_crashpad',
|
||||
'type': 'executable',
|
||||
'dependencies': [
|
||||
'tool_support',
|
||||
'../client/client.gyp:client',
|
||||
'../compat/compat.gyp:compat',
|
||||
'crashpad_tool_support',
|
||||
'../client/client.gyp:crashpad_client',
|
||||
'../compat/compat.gyp:crashpad_compat',
|
||||
'../third_party/mini_chromium/mini_chromium/base/base.gyp:base',
|
||||
],
|
||||
'include_dirs': [
|
||||
|
@ -26,9 +26,10 @@ TEST(ExecutablePath, ExecutablePath) {
|
||||
base::FilePath executable_path = ExecutablePath();
|
||||
base::FilePath executable_name = executable_path.BaseName();
|
||||
#if defined(OS_WIN)
|
||||
EXPECT_EQ(FILE_PATH_LITERAL("util_test.exe"), executable_name.value());
|
||||
EXPECT_EQ(FILE_PATH_LITERAL("crashpad_util_test.exe"),
|
||||
executable_name.value());
|
||||
#else
|
||||
EXPECT_EQ("util_test", executable_name.value());
|
||||
EXPECT_EQ("crashpad_util_test", executable_name.value());
|
||||
#endif // OS_WIN
|
||||
}
|
||||
|
||||
|
@ -18,10 +18,10 @@
|
||||
],
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'util',
|
||||
'target_name': 'crashpad_util',
|
||||
'type': 'static_library',
|
||||
'dependencies': [
|
||||
'../compat/compat.gyp:compat',
|
||||
'../compat/compat.gyp:crashpad_compat',
|
||||
'../third_party/mini_chromium/mini_chromium/base/base.gyp:base',
|
||||
],
|
||||
'include_dirs': [
|
||||
@ -210,13 +210,13 @@
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'util_test_lib',
|
||||
'target_name': 'crashpad_util_test_lib',
|
||||
'type': 'static_library',
|
||||
'dependencies': [
|
||||
'../compat/compat.gyp:compat',
|
||||
'../compat/compat.gyp:crashpad_compat',
|
||||
'../third_party/gtest/gtest.gyp:gtest',
|
||||
'../third_party/mini_chromium/mini_chromium/base/base.gyp:base',
|
||||
'util',
|
||||
'crashpad_util',
|
||||
],
|
||||
'include_dirs': [
|
||||
'..',
|
||||
@ -253,13 +253,13 @@
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'util_test',
|
||||
'target_name': 'crashpad_util_test',
|
||||
'type': 'executable',
|
||||
'dependencies': [
|
||||
'util',
|
||||
'util_test_lib',
|
||||
'util_test_multiprocess_exec_test_child',
|
||||
'../compat/compat.gyp:compat',
|
||||
'crashpad_util',
|
||||
'crashpad_util_test_lib',
|
||||
'crashpad_util_test_multiprocess_exec_test_child',
|
||||
'../compat/compat.gyp:crashpad_compat',
|
||||
'../third_party/gmock/gmock.gyp:gmock',
|
||||
'../third_party/gtest/gtest.gyp:gtest',
|
||||
'../third_party/gtest/gtest.gyp:gtest_main',
|
||||
@ -334,7 +334,7 @@
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'util_test_multiprocess_exec_test_child',
|
||||
'target_name': 'crashpad_util_test_multiprocess_exec_test_child',
|
||||
'type': 'executable',
|
||||
'sources': [
|
||||
'test/multiprocess_exec_test_child.cc',
|
||||
@ -345,7 +345,7 @@
|
||||
['OS=="win"', {
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'util_test_process_info_test_child',
|
||||
'target_name': 'crashpad_util_test_process_info_test_child',
|
||||
'type': 'executable',
|
||||
'sources': [
|
||||
'win/process_info_test_child.cc',
|
||||
|
@ -52,7 +52,7 @@ TEST(ProcessInfo, Self) {
|
||||
std::vector<std::wstring> modules;
|
||||
EXPECT_TRUE(process_info.Modules(&modules));
|
||||
ASSERT_GE(modules.size(), 2u);
|
||||
const wchar_t kSelfName[] = L"\\util_test.exe";
|
||||
const wchar_t kSelfName[] = L"\\crashpad_util_test.exe";
|
||||
ASSERT_GE(modules[0].size(), wcslen(kSelfName));
|
||||
EXPECT_EQ(kSelfName,
|
||||
modules[0].substr(modules[0].size() - wcslen(kSelfName)));
|
||||
@ -113,7 +113,8 @@ TEST(ProcessInfo, SomeOtherProcess) {
|
||||
std::vector<std::wstring> modules;
|
||||
EXPECT_TRUE(process_info.Modules(&modules));
|
||||
ASSERT_GE(modules.size(), 3u);
|
||||
const wchar_t kChildName[] = L"\\util_test_process_info_test_child.exe";
|
||||
const wchar_t kChildName[] =
|
||||
L"\\crashpad_util_test_process_info_test_child.exe";
|
||||
ASSERT_GE(modules[0].size(), wcslen(kChildName));
|
||||
EXPECT_EQ(kChildName,
|
||||
modules[0].substr(modules[0].size() - wcslen(kChildName)));
|
||||
|
Loading…
x
Reference in New Issue
Block a user