summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorbbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-13 02:20:12 +0000
committerbbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-13 02:20:12 +0000
commit84ed6dd1a043b6586792cef9ee2e609538ca183d (patch)
treebcfca8ddfbeeba932889667a8feb970fc3f4fe2f /ipc
parent21ee4acc4e419f01956516a690e7873d32204fab (diff)
downloadchromium_src-84ed6dd1a043b6586792cef9ee2e609538ca183d.zip
chromium_src-84ed6dd1a043b6586792cef9ee2e609538ca183d.tar.gz
chromium_src-84ed6dd1a043b6586792cef9ee2e609538ca183d.tar.bz2
Add an untrusted NaCl build for IPC.
BUG=116317 TEST=compiles Review URL: https://chromiumcodereview.appspot.com/10534115 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141834 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc')
-rw-r--r--ipc/ipc.gyp65
-rw-r--r--ipc/ipc.gypi58
-rw-r--r--ipc/ipc_untrusted.gyp36
3 files changed, 90 insertions, 69 deletions
diff --git a/ipc/ipc.gyp b/ipc/ipc.gyp
index 7d61a89..5ed8b66 100644
--- a/ipc/ipc.gyp
+++ b/ipc/ipc.gyp
@@ -6,31 +6,29 @@
'variables': {
'chromium_code': 1,
},
- 'target_defaults': {
- 'sources/': [
- ['exclude', '/win/'],
- ['exclude', '_(posix|win)(_unittest)?\\.(cc|mm?)$'],
- ['exclude', '/win_[^/]*\\.cc$'],
- ],
- 'conditions': [
- ['os_posix == 1 and OS != "mac"', {'sources/': [
- ['include', '_posix(_unittest)?\\.cc$'],
- ]}],
- ['OS=="mac"', {'sources/': [
- ['include', '_posix(_unittest)?\\.(cc|mm?)$'],
- ]}],
- ['OS=="win"', {'sources/': [
- ['include', '_win(_unittest)?\\.cc$'],
- ['include', '/win/'],
- ['include', '/win_[^/]*\\.cc$'],
- ]}],
- ],
- },
'includes': [
'ipc.gypi',
],
'targets': [
{
+ 'target_name': 'ipc',
+ 'type': '<(component)',
+ 'variables': {
+ 'ipc_target': 1,
+ },
+ 'dependencies': [
+ '../base/base.gyp:base',
+ '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
+ ],
+ # TODO(gregoryd): direct_dependent_settings should be shared with the
+ # 64-bit target, but it doesn't work due to a bug in gyp
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '..',
+ ],
+ },
+ },
+ {
'target_name': 'ipc_tests',
'type': '<(gtest_target_type)',
'dependencies': [
@@ -93,6 +91,33 @@
},
],
'conditions': [
+ ['OS=="win"', {
+ 'targets': [
+ {
+ 'target_name': 'ipc_win64',
+ 'type': '<(component)',
+ 'variables': {
+ 'ipc_target': 1,
+ },
+ 'dependencies': [
+ '../base/base.gyp:base_nacl_win64',
+ '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
+ ],
+ # TODO(gregoryd): direct_dependent_settings should be shared with the
+ # 32-bit target, but it doesn't work due to a bug in gyp
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '..',
+ ],
+ },
+ 'configurations': {
+ 'Common_Base': {
+ 'msvs_target_platform': 'x64',
+ },
+ },
+ },
+ ],
+ }],
# Special target to wrap a gtest_target_type==shared_library
# ipc_tests into an android apk for execution.
# See base.gyp for TODO(jrg)s about this strategy.
diff --git a/ipc/ipc.gypi b/ipc/ipc.gypi
index f7c11a6..e199cd2 100644
--- a/ipc/ipc.gypi
+++ b/ipc/ipc.gypi
@@ -16,6 +16,8 @@
'ipc_channel.h',
'ipc_channel.cc',
'ipc_channel_handle.h',
+ 'ipc_channel_nacl.cc',
+ 'ipc_channel_nacl.h',
'ipc_channel_posix.cc',
'ipc_channel_posix.h',
'ipc_channel_proxy.cc',
@@ -59,56 +61,14 @@
'include_dirs': [
'..',
],
+ 'target_conditions': [
+ ['>(nacl_untrusted_build)==1', {
+ 'sources!': [
+ 'ipc_channel_posix.cc',
+ ],
+ }],
+ ],
}],
],
},
- 'targets': [
- {
- 'target_name': 'ipc',
- 'type': '<(component)',
- 'variables': {
- 'ipc_target': 1,
- },
- 'dependencies': [
- '../base/base.gyp:base',
- '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
- ],
- # TODO(gregoryd): direct_dependent_settings should be shared with the
- # 64-bit target, but it doesn't work due to a bug in gyp
- 'direct_dependent_settings': {
- 'include_dirs': [
- '..',
- ],
- },
- },
- ],
- 'conditions': [
- ['OS=="win"', {
- 'targets': [
- {
- 'target_name': 'ipc_win64',
- 'type': '<(component)',
- 'variables': {
- 'ipc_target': 1,
- },
- 'dependencies': [
- '../base/base.gyp:base_nacl_win64',
- '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
- ],
- # TODO(gregoryd): direct_dependent_settings should be shared with the
- # 32-bit target, but it doesn't work due to a bug in gyp
- 'direct_dependent_settings': {
- 'include_dirs': [
- '..',
- ],
- },
- 'configurations': {
- 'Common_Base': {
- 'msvs_target_platform': 'x64',
- },
- },
- },
- ],
- }],
- ],
}
diff --git a/ipc/ipc_untrusted.gyp b/ipc/ipc_untrusted.gyp
new file mode 100644
index 0000000..5a6a6ff
--- /dev/null
+++ b/ipc/ipc_untrusted.gyp
@@ -0,0 +1,36 @@
+# Copyright (c) 2012 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.
+
+{
+ 'variables': {
+ 'chromium_code': 1,
+ },
+ 'includes': [
+ '../native_client/build/untrusted.gypi',
+ 'ipc.gypi',
+ ],
+ 'conditions': [
+ ['disable_nacl_untrusted==0', {
+ 'targets': [
+ {
+ 'target_name': 'ipc_untrusted',
+ 'type': 'none',
+ 'variables': {
+ 'ipc_target': 1,
+ 'nacl_untrusted_build': 1,
+ 'nlib_target': 'libipc_untrusted.a',
+ 'build_glibc': 0,
+ 'build_newlib': 1,
+ },
+ 'dependencies': [
+ '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
+ '<(DEPTH)/native_client/src/untrusted/pthread/pthread.gyp:pthread_lib',
+ '<(DEPTH)/native_client/src/untrusted/nacl/nacl.gyp:nacl_lib_newlib',
+ '../base/base_untrusted.gyp:base_untrusted',
+ ],
+ },
+ ],
+ }],
+ ],
+}