summaryrefslogtreecommitdiffstats
path: root/chromeos
diff options
context:
space:
mode:
authorhashimoto <hashimoto@chromium.org>2016-03-08 19:19:31 -0800
committerCommit bot <commit-bot@chromium.org>2016-03-09 03:21:46 +0000
commitc5ffb8b1461938b73d077f77fd0988f6860a2295 (patch)
treecf6fb4f1463c38d8b794a559e344e8c21d180520 /chromeos
parent29f95615c5159c23bb5227d035daa9b90a580c0a (diff)
downloadchromium_src-c5ffb8b1461938b73d077f77fd0988f6860a2295.zip
chromium_src-c5ffb8b1461938b73d077f77fd0988f6860a2295.tar.gz
chromium_src-c5ffb8b1461938b73d077f77fd0988f6860a2295.tar.bz2
Always build binder code
Regardless of use_binder's value, build binder code. Tests are still built only when use_binder==1. BUG=563282 Review URL: https://codereview.chromium.org/1563263004 Cr-Commit-Position: refs/heads/master@{#380049}
Diffstat (limited to 'chromeos')
-rw-r--r--chromeos/BUILD.gn7
-rw-r--r--chromeos/binder/DEPS3
-rw-r--r--chromeos/binder/binder_driver_api.h16
-rw-r--r--chromeos/binder/command_broker.cc2
-rw-r--r--chromeos/binder/command_stream.cc2
-rw-r--r--chromeos/binder/command_stream_unittest.cc4
-rw-r--r--chromeos/binder/driver.cc2
-rw-r--r--chromeos/binder/transaction_data_from_driver.h4
-rw-r--r--chromeos/binder/transaction_data_read_write_unittest.cc4
-rw-r--r--chromeos/binder/transaction_data_reader.cc3
-rw-r--r--chromeos/binder/util.cc5
-rw-r--r--chromeos/binder/writable_transaction_data.cc3
-rw-r--r--chromeos/chromeos.gyp73
13 files changed, 63 insertions, 65 deletions
diff --git a/chromeos/BUILD.gn b/chromeos/BUILD.gn
index b7203f0..83c04f6 100644
--- a/chromeos/BUILD.gn
+++ b/chromeos/BUILD.gn
@@ -46,11 +46,8 @@ component("chromeos") {
]
sources = gypi_values.chromeos_sources
defines = [ "CHROMEOS_IMPLEMENTATION" ]
- if (use_binder) {
- if (target_cpu == "arm" || target_cpu == "x86") {
- defines += [ "BINDER_IPC_32BIT" ]
- }
- sources += gypi_values.chromeos_binder_sources
+ if (target_cpu == "arm" || target_cpu == "x86") {
+ defines += [ "BINDER_IPC_32BIT" ]
}
}
diff --git a/chromeos/binder/DEPS b/chromeos/binder/DEPS
new file mode 100644
index 0000000..9d431c6
--- /dev/null
+++ b/chromeos/binder/DEPS
@@ -0,0 +1,3 @@
+include_rules = [
+ "+chromeos/third_party/android_bionic_libc",
+]
diff --git a/chromeos/binder/binder_driver_api.h b/chromeos/binder/binder_driver_api.h
new file mode 100644
index 0000000..332af22
--- /dev/null
+++ b/chromeos/binder/binder_driver_api.h
@@ -0,0 +1,16 @@
+// Copyright 2016 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.
+
+// Include this header for types and constants used by the kernel binder driver.
+
+#ifndef CHROMEOS_BINDER_BINDER_DRIVER_API_H_
+#define CHROMEOS_BINDER_BINDER_DRIVER_API_H_
+
+// binder.h needs __packed to be defined.
+#define __packed __attribute__((__packed__))
+
+#include <asm/types.h>
+#include "chromeos/third_party/android_bionic_libc/kernel/uapi/linux/binder.h"
+
+#endif // CHROMEOS_BINDER_BINDER_DRIVER_API_H_
diff --git a/chromeos/binder/command_broker.cc b/chromeos/binder/command_broker.cc
index fddddb1..f4a74f1 100644
--- a/chromeos/binder/command_broker.cc
+++ b/chromeos/binder/command_broker.cc
@@ -4,12 +4,12 @@
#include "chromeos/binder/command_broker.h"
-#include <linux/android/binder.h>
#include <stddef.h>
#include <stdint.h>
#include "base/bind.h"
#include "base/logging.h"
+#include "chromeos/binder/binder_driver_api.h"
#include "chromeos/binder/driver.h"
#include "chromeos/binder/local_object.h"
#include "chromeos/binder/transaction_data.h"
diff --git a/chromeos/binder/command_stream.cc b/chromeos/binder/command_stream.cc
index 89f8ced..6419afb 100644
--- a/chromeos/binder/command_stream.cc
+++ b/chromeos/binder/command_stream.cc
@@ -4,11 +4,11 @@
#include "chromeos/binder/command_stream.h"
-#include <linux/android/binder.h>
#include <stddef.h>
#include <stdint.h>
#include "base/bind.h"
+#include "chromeos/binder/binder_driver_api.h"
#include "chromeos/binder/buffer_reader.h"
#include "chromeos/binder/driver.h"
#include "chromeos/binder/transaction_data.h"
diff --git a/chromeos/binder/command_stream_unittest.cc b/chromeos/binder/command_stream_unittest.cc
index 16c3083..74c5ce6 100644
--- a/chromeos/binder/command_stream_unittest.cc
+++ b/chromeos/binder/command_stream_unittest.cc
@@ -2,10 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include <unistd.h>
-#include <linux/android/binder.h>
-
#include "base/message_loop/message_loop.h"
+#include "chromeos/binder/binder_driver_api.h"
#include "chromeos/binder/command_stream.h"
#include "chromeos/binder/constants.h"
#include "chromeos/binder/driver.h"
diff --git a/chromeos/binder/driver.cc b/chromeos/binder/driver.cc
index f07c96f..dc15ebe 100644
--- a/chromeos/binder/driver.cc
+++ b/chromeos/binder/driver.cc
@@ -6,7 +6,6 @@
#include <errno.h>
#include <fcntl.h>
-#include <linux/android/binder.h>
#include <poll.h>
#include <stddef.h>
#include <sys/ioctl.h>
@@ -15,6 +14,7 @@
#include "base/posix/eintr_wrapper.h"
#include "base/threading/thread_restrictions.h"
+#include "chromeos/binder/binder_driver_api.h"
namespace binder {
diff --git a/chromeos/binder/transaction_data_from_driver.h b/chromeos/binder/transaction_data_from_driver.h
index c2a248f..0ddf43f 100644
--- a/chromeos/binder/transaction_data_from_driver.h
+++ b/chromeos/binder/transaction_data_from_driver.h
@@ -7,13 +7,11 @@
#include <stddef.h>
#include <stdint.h>
-#include <sys/types.h>
-
-#include <linux/android/binder.h>
#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
+#include "chromeos/binder/binder_driver_api.h"
#include "chromeos/binder/transaction_data.h"
#include "chromeos/chromeos_export.h"
diff --git a/chromeos/binder/transaction_data_read_write_unittest.cc b/chromeos/binder/transaction_data_read_write_unittest.cc
index 37ec649..e636961 100644
--- a/chromeos/binder/transaction_data_read_write_unittest.cc
+++ b/chromeos/binder/transaction_data_read_write_unittest.cc
@@ -4,9 +4,6 @@
#include <stddef.h>
#include <stdint.h>
-#include <sys/types.h>
-
-#include <linux/android/binder.h>
#include <vector>
@@ -17,6 +14,7 @@
#include "base/files/scoped_temp_dir.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/utf_string_conversions.h"
+#include "chromeos/binder/binder_driver_api.h"
#include "chromeos/binder/command_broker.h"
#include "chromeos/binder/driver.h"
#include "chromeos/binder/local_object.h"
diff --git a/chromeos/binder/transaction_data_reader.cc b/chromeos/binder/transaction_data_reader.cc
index b1006ab..91e0f91 100644
--- a/chromeos/binder/transaction_data_reader.cc
+++ b/chromeos/binder/transaction_data_reader.cc
@@ -7,9 +7,8 @@
#include <stddef.h>
#include <stdint.h>
-#include <linux/android/binder.h>
-
#include "base/logging.h"
+#include "chromeos/binder/binder_driver_api.h"
#include "chromeos/binder/local_object.h"
#include "chromeos/binder/object.h"
#include "chromeos/binder/remote_object.h"
diff --git a/chromeos/binder/util.cc b/chromeos/binder/util.cc
index 49736b5..afbbda5 100644
--- a/chromeos/binder/util.cc
+++ b/chromeos/binder/util.cc
@@ -4,11 +4,8 @@
#include "chromeos/binder/util.h"
-#include <sys/types.h>
-
-#include <linux/android/binder.h>
-
#include "base/logging.h"
+#include "chromeos/binder/binder_driver_api.h"
namespace binder {
diff --git a/chromeos/binder/writable_transaction_data.cc b/chromeos/binder/writable_transaction_data.cc
index a89042e..5e56268 100644
--- a/chromeos/binder/writable_transaction_data.cc
+++ b/chromeos/binder/writable_transaction_data.cc
@@ -4,8 +4,7 @@
#include "chromeos/binder/writable_transaction_data.h"
-#include <linux/android/binder.h>
-
+#include "chromeos/binder/binder_driver_api.h"
#include "chromeos/binder/constants.h"
#include "chromeos/binder/local_object.h"
#include "chromeos/binder/object.h"
diff --git a/chromeos/chromeos.gyp b/chromeos/chromeos.gyp
index 9b76232..049a542 100644
--- a/chromeos/chromeos.gyp
+++ b/chromeos/chromeos.gyp
@@ -28,6 +28,36 @@
'audio/chromeos_sounds.h',
'audio/cras_audio_handler.cc',
'audio/cras_audio_handler.h',
+ 'binder/buffer_reader.cc',
+ 'binder/buffer_reader.h',
+ 'binder/command_broker.cc',
+ 'binder/command_broker.h',
+ 'binder/command_stream.cc',
+ 'binder/command_stream.h',
+ 'binder/constants.h',
+ 'binder/driver.cc',
+ 'binder/driver.h',
+ 'binder/ipc_thread.cc',
+ 'binder/ipc_thread.h',
+ 'binder/local_object.cc',
+ 'binder/local_object.h',
+ 'binder/object.h',
+ 'binder/remote_object.cc',
+ 'binder/remote_object.h',
+ 'binder/service_manager_proxy.cc',
+ 'binder/service_manager_proxy.h',
+ 'binder/status.h',
+ 'binder/transaction_data.h',
+ 'binder/transaction_data_from_driver.cc',
+ 'binder/transaction_data_from_driver.h',
+ 'binder/transaction_data_reader.cc',
+ 'binder/transaction_data_reader.h',
+ 'binder/transaction_status.cc',
+ 'binder/transaction_status.h',
+ 'binder/util.cc',
+ 'binder/util.h',
+ 'binder/writable_transaction_data.cc',
+ 'binder/writable_transaction_data.h',
'cert_loader.cc',
'cert_loader.h',
'chromeos_constants.cc',
@@ -388,38 +418,6 @@
'tpm/tpm_token_loader.cc',
'tpm/tpm_token_loader.h'
],
- 'chromeos_binder_sources': [
- 'binder/buffer_reader.cc',
- 'binder/buffer_reader.h',
- 'binder/command_broker.cc',
- 'binder/command_broker.h',
- 'binder/command_stream.cc',
- 'binder/command_stream.h',
- 'binder/constants.h',
- 'binder/driver.cc',
- 'binder/driver.h',
- 'binder/ipc_thread.cc',
- 'binder/ipc_thread.h',
- 'binder/local_object.cc',
- 'binder/local_object.h',
- 'binder/object.h',
- 'binder/remote_object.cc',
- 'binder/remote_object.h',
- 'binder/service_manager_proxy.cc',
- 'binder/service_manager_proxy.h',
- 'binder/status.h',
- 'binder/transaction_data.h',
- 'binder/transaction_data_from_driver.cc',
- 'binder/transaction_data_from_driver.h',
- 'binder/transaction_data_reader.cc',
- 'binder/transaction_data_reader.h',
- 'binder/transaction_status.cc',
- 'binder/transaction_status.h',
- 'binder/util.cc',
- 'binder/util.h',
- 'binder/writable_transaction_data.cc',
- 'binder/writable_transaction_data.h',
- ],
'chromeos_binder_test_sources': [
'binder/buffer_reader_unittest.cc',
'binder/command_broker_unittest.cc',
@@ -537,14 +535,9 @@
],
'sources': [ '<@(chromeos_sources)' ],
'conditions': [
- ['use_binder == 1', {
- 'sources': [ '<@(chromeos_binder_sources)' ],
- 'conditions': [
- ['target_arch == "arm" or target_arch == "ia32"', {
- 'defines': [
- 'BINDER_IPC_32BIT',
- ],
- }],
+ ['target_arch == "arm" or target_arch == "ia32"', {
+ 'defines': [
+ 'BINDER_IPC_32BIT',
],
}],
],