Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: fixes and optimizations in gyp files #27108

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 34 additions & 3 deletions deps/gtest/gtest.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,22 @@
{
'target_name': 'gtest',
'type': 'static_library',
'cflags': ['-Wno-missing-field-initializers'],
'cflags': [
'-Wno-missing-field-initializers',
],
'direct_dependent_settings': {
'include_dirs': ['include'],
'include_dirs': [
'include',
],
},
'include_dirs': ['.', 'include'],
'defines': [
'GTEST_LANG_CXX11=1',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://codereview.chromium.org/2174663002/. Maybe we should be bumping our vendored in version of gtest?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have that in the pipe line.

'GTEST_HAS_TR1_TUPLE=0',
],
'include_dirs': [
'.',
'include',
],
'sources': [
'src/gtest-death-test.cc',
'src/gtest-filepath.cc',
Expand All @@ -18,6 +29,26 @@
'src/gtest-typed-test.cc',
'src/gtest.cc',
'src/gtest_main.cc',
'include/gtest/internal/gtest-death-test-internal.h',
'include/gtest/internal/gtest-filepath.h',
'include/gtest/internal/gtest-internal.h',
'include/gtest/internal/gtest-linked_ptr.h',
'include/gtest/internal/gtest-param-util.h',
'include/gtest/internal/gtest-param-util-generated.h',
'include/gtest/internal/gtest-port.h',
'include/gtest/internal/gtest-string.h',
'include/gtest/internal/gtest-tuple.h',
'include/gtest/internal/gtest-type-util.h',
'include/gtest/gtest.h',
'include/gtest/gtest-death-test.h',
'include/gtest/gtest-message.h',
'include/gtest/gtest-param-test.h',
'include/gtest/gtest-printers.h',
'include/gtest/gtest-spi.h',
'include/gtest/gtest-test-part.h',
'include/gtest/gtest-typed-test.h',
'include/gtest/gtest_pred_impl.h',
'include/gtest/gtest_prod.h',
],
}
],
Expand Down
185 changes: 185 additions & 0 deletions dtrace.gypi
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
{
'defines': ['HAVE_DTRACE=1'],
'variables': {
'generated_node_dtrace_header': '<(INTERMEDIATE_DIR)/node_dtrace_header',
},
'include_dirs': [
'<(generated_node_dtrace_header)'
],
#
# DTrace is supported on linux, solaris, mac, and bsd. There are
# three object files associated with DTrace support, but they're
# not all used all the time:
#
# node_dtrace.o all configurations
# node_dtrace_ustack.o not supported on mac and linux
# node_dtrace_provider.o All except OS X. "dtrace -G" is not
# used on OS X.
#
# Note that node_dtrace_provider.cc and node_dtrace_ustack.cc do not
# actually exist. They're listed here to trick GYP into linking the
# corresponding object files into the final "node" executable. These
# object files are generated by "dtrace -G" using custom actions
# below, and the GYP-generated Makefiles will properly build them when
# needed.
#
'sources': [
'src/node_dtrace.h',
'src/node_dtrace.cc',
],
'conditions': [
['OS=="linux"', {
'actions': [
{
'action_name': 'node_dtrace_header',
'process_outputs_as_sources': 1,
'inputs': [
'src/node_provider.d'
],
'outputs': [
'<(generated_node_dtrace_header)/node_provider.h'
],
'action': [
'dtrace', '-h',
'-s', '<@(_inputs)',
'-o', '<@(_outputs)',
]
},
{
'action_name': 'node_dtrace_provider_o',
'process_outputs_as_sources': 1,
'inputs': [
'src/node_provider.d'
],
'outputs': [
'<(generated_node_dtrace_header)/node_dtrace_provider.o'
],
'action': [
'dtrace', '-C', '-G',
'-s', '<@(_inputs)',
'-o', '<@(_outputs)',
],
},
],
}],
['node_use_dtrace=="true" and OS!="linux"', {
'actions': [
{
'action_name': 'node_dtrace_header',
'process_outputs_as_sources': 1,
'inputs': ['src/node_provider.d'],
'outputs': ['<(generated_node_dtrace_header)/node_provider.h'],
'action': ['dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
'-o', '<@(_outputs)']
}
]
}],
['node_use_dtrace=="true" and OS=="linux"', {
'actions': [
{
'action_name': 'node_dtrace_header',
'process_outputs_as_sources': 1,
'inputs': ['src/node_provider.d'],
'outputs': ['<(generated_node_dtrace_header)/node_provider.h'],
'action': ['dtrace', '-h', '-s', '<@(_inputs)',
'-o', '<@(_outputs)']
}
]
}],
['node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
'actions': [
{
'action_name': 'node_dtrace_provider_o',
'process_outputs_as_sources': 1,
'inputs': [
'<(obj_dir)/<(node_lib_target_name)/src/node_dtrace.o',
],
'outputs': [
'<(obj_dir)/<(node_lib_target_name)/src/node_dtrace_provider.o'
],
'action': ['dtrace', '-G', '-xnolibs', '-s', 'src/node_provider.d',
'<@(_inputs)', '-o', '<@(_outputs)']
}
]
}],
['node_use_dtrace=="true" and OS=="linux"', {
'actions': [
{
'action_name': 'node_dtrace_provider_o',
'process_outputs_as_sources': 1,
'inputs': ['src/node_provider.d'],
'outputs': [
'<(generated_node_dtrace_header)/node_dtrace_provider.o'
],
'action': [
'dtrace', '-C', '-G', '-s', '<@(_inputs)', '-o', '<@(_outputs)'
],
}
],
}],
['node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
'actions': [
{
'action_name': 'node_dtrace_ustack_constants',
'process_outputs_as_sources': 1,
'inputs': [
'<(v8_base)'
],
'outputs': [
'<(generated_node_dtrace_header)/v8constants.h'
],
'action': [
'tools/genv8constants.py',
'<@(_outputs)',
'<@(_inputs)'
]
},
{
'action_name': 'node_dtrace_ustack',
'process_outputs_as_sources': 1,
'inputs': [
'src/v8ustack.d',
'<(generated_node_dtrace_header)/v8constants.h'
],
'outputs': [
'<(obj_dir)/<(node_lib_target_name)/src/node_dtrace_ustack.o'
],
'conditions': [
['target_arch=="ia32" or target_arch=="arm"', {
'action': [
'dtrace', '-32', '-I<(generated_node_dtrace_header)', '-Isrc',
'-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
]
}],
['target_arch=="x64"', {
'action': [
'dtrace', '-64', '-I<(generated_node_dtrace_header)', '-Isrc',
'-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
]
}],
]
},
]
}],
['node_use_dtrace=="true"', {
'actions': [
{
'action_name': 'specialize_node_d',
'inputs': [
'src/node.d'
],
'outputs': [
'<(PRODUCT_DIR)/node.d',
],
'action': [
'tools/specialize_node_d.py',
'<@(_outputs)',
'<@(_inputs)',
'<@(OS)',
'<@(target_arch)',
],
},
],
}],
],
}
Loading