aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorJakub Pawlowski <jpawlowski@google.com>2016-02-22 18:04:24 -0800
committerJakub Pawlowski <jpawlowski@google.com>2016-02-24 11:40:26 -0800
commitd7a05a0c5bead54b50a70ffe50d3f371a57ae7ff (patch)
tree4d41b93c6ba3aa226bc9cac4a5e05213e9ce7282 /build
parent45d129394a71a112e28567f47faf89d365bca0a0 (diff)
downloadbt-d7a05a0c5bead54b50a70ffe50d3f371a57ae7ff.tar.gz
Update build files for Fluoride on Linux
uprev build/secondary/third_party/**/BUILD.gn" Other BUILD.gn files were updated to match current state of project. Change-Id: Ie895d25680d510f5e69e6f15553311f6671cdce3
Diffstat (limited to 'build')
-rw-r--r--build/BUILD.gn21
-rw-r--r--build/secondary/third_party/gmock/BUILD.gn52
-rw-r--r--build/secondary/third_party/googletest/BUILD.gn91
-rw-r--r--build/secondary/third_party/gtest/BUILD.gn77
-rw-r--r--build/secondary/third_party/libchrome/BUILD.gn51
-rw-r--r--build/secondary/third_party/tinyxml2/BUILD.gn23
-rw-r--r--build/toolchain/gcc/BUILD.gn3
7 files changed, 145 insertions, 173 deletions
diff --git a/build/BUILD.gn b/build/BUILD.gn
index fb20a34f6..eae173727 100644
--- a/build/BUILD.gn
+++ b/build/BUILD.gn
@@ -18,16 +18,22 @@ declare_args() {
# Include path for hardware/bluetooth.h
libhw_include_path = ""
core_include_path = ""
+ audio_include_path = ""
}
config("default_include_dirs") {
# TODO(armansito): Remove "core_include_path" once the cutils includes have
# been removed.
- assert(libhw_include_path != "", "libhardware_include_path build argument wasn't provided.")
- assert(core_include_path != "", "core_include_path build argument wasn't provided.")
+ assert(libhw_include_path != "",
+ "libhardware_include_path build argument wasn't provided.")
+ assert(core_include_path != "",
+ "core_include_path build argument wasn't provided.")
+ assert(audio_include_path != "",
+ "audio_include_path build argument wasn't provided.")
include_dirs = [
libhw_include_path,
core_include_path,
+ audio_include_path,
]
}
@@ -35,8 +41,9 @@ config("linux") {
# TODO(keybuk): AndroidConfig.h or equivalent
cflags = [
- "-Wall",
- "-Werror",
+ #TODO(jpawlowski): uncomment once we have no warnings on linux build
+ # "-Wall",
+ # "-Werror",
"-g",
"-O0",
"-fpic",
@@ -45,9 +52,7 @@ config("linux") {
"-fvisibility=hidden",
]
- cflags_c = [
- "-std=c99"
- ]
+ cflags_c = [ "-std=c99" ]
cflags_cc = [
"-std=c++11",
@@ -60,6 +65,8 @@ config("linux") {
"HAS_NO_BDROID_BUILDCFG",
"LOG_NDEBUG=1",
"EXPORT_SYMBOL=__attribute__((visibility(\"default\")))",
+ "PROPERTY_VALUE_MAX=256",
+ "KERNEL_MISSING_CLOCK_BOOTTIME_ALARM=TRUE",
# This is a macro to that can be used by source code to detect if the
# current build is done by GN or via Android.mk. This is a temporary
diff --git a/build/secondary/third_party/gmock/BUILD.gn b/build/secondary/third_party/gmock/BUILD.gn
deleted file mode 100644
index e1c4cf31b..000000000
--- a/build/secondary/third_party/gmock/BUILD.gn
+++ /dev/null
@@ -1,52 +0,0 @@
-# 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.
-
-config("gmock_config") {
- # Gmock headers need to be able to find themselves.
- include_dirs = [ "include" ]
-}
-
-static_library("gmock") {
- testonly = true
- sources = [
- # Sources based on files in r173 of gmock.
- "include/gmock/gmock-actions.h",
- "include/gmock/gmock-cardinalities.h",
- "include/gmock/gmock-generated-actions.h",
- "include/gmock/gmock-generated-function-mockers.h",
- "include/gmock/gmock-generated-matchers.h",
- "include/gmock/gmock-generated-nice-strict.h",
- "include/gmock/gmock-matchers.h",
- "include/gmock/gmock-spec-builders.h",
- "include/gmock/gmock.h",
- "include/gmock/internal/gmock-generated-internal-utils.h",
- "include/gmock/internal/gmock-internal-utils.h",
- "include/gmock/internal/gmock-port.h",
-
- #"src/gmock-all.cc", # Not needed by our build.
- "src/gmock-cardinalities.cc",
- "src/gmock-internal-utils.cc",
- "src/gmock-matchers.cc",
- "src/gmock-spec-builders.cc",
- "src/gmock.cc",
- ]
-
- # This project includes some stuff form gtest's guts.
- include_dirs = [ "../gtest/include" ]
-
- public_configs = [
- ":gmock_config",
- "//third_party/gtest:gtest_config",
- ]
-}
-
-static_library("gmock_main") {
- testonly = true
- sources = [
- "src/gmock_main.cc",
- ]
- deps = [
- ":gmock",
- ]
-}
diff --git a/build/secondary/third_party/googletest/BUILD.gn b/build/secondary/third_party/googletest/BUILD.gn
new file mode 100644
index 000000000..0122adcd5
--- /dev/null
+++ b/build/secondary/third_party/googletest/BUILD.gn
@@ -0,0 +1,91 @@
+#
+# Copyright (C) 2016 Google, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+config("gtest_config") {
+ # Gtest headers need to be able to find themselves.
+ include_dirs = [ "googletest/include" ]
+
+ defines = [ "GTEST_HAS_RTTI=0" ]
+}
+
+config("gtest_direct_config") {
+ visibility = [ ":*" ]
+ defines = [ "UNIT_TEST" ]
+}
+
+static_library("gtest") {
+ testonly = true
+ sources = [
+ "googletest/src/gtest-all.cc",
+ ]
+
+ include_dirs = [
+ "googletest/",
+ "googletest/include",
+ ]
+
+ all_dependent_configs = [ ":gtest_config" ]
+ public_configs = [ ":gtest_direct_config" ]
+}
+
+source_set("gtest_main") {
+ testonly = true
+ sources = [
+ "googletest/src/gtest_main.cc",
+ ]
+ deps = [
+ ":gtest",
+ ]
+}
+
+config("gmock_config") {
+ # Gmock headers need to be able to find themselves.
+ include_dirs = [ "googlemock/include" ]
+}
+
+static_library("gmock") {
+ testonly = true
+ sources = [
+ "googlemock/src/gmock-all.cc",
+ ]
+
+ # This project includes some stuff form gtest's guts.
+ include_dirs = [
+ "googlemock",
+ "googlemock/include",
+ ]
+
+ public_configs = [
+ ":gmock_config",
+ ":gtest_config",
+ ]
+}
+
+static_library("gmock_main") {
+ testonly = true
+ sources = [
+ "googlemock/src/gmock_main.cc",
+ ]
+ deps = [
+ ":gmock",
+ ":gtest",
+ ]
+
+ public_configs = [
+ ":gmock_config",
+ ":gtest_config",
+ ]
+}
diff --git a/build/secondary/third_party/gtest/BUILD.gn b/build/secondary/third_party/gtest/BUILD.gn
deleted file mode 100644
index c1112d952..000000000
--- a/build/secondary/third_party/gtest/BUILD.gn
+++ /dev/null
@@ -1,77 +0,0 @@
-#
-# Copyright (C) 2015 Google, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-config("gtest_config") {
- # Gtest headers need to be able to find themselves.
- include_dirs = [ "include" ]
-
- defines = [ "GTEST_HAS_RTTI=0" ]
-}
-
-config("gtest_direct_config") {
- visibility = [ ":*" ]
- defines = [ "UNIT_TEST" ]
-}
-
-static_library("gtest") {
- testonly = true
- sources = [
- "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.h",
- "include/gtest/gtest_pred_impl.h",
- "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-generated.h",
- "include/gtest/internal/gtest-param-util.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",
-
- "src/gtest-all.cc",
- "src/gtest-death-test.cc",
- "src/gtest-filepath.cc",
- "src/gtest-internal-inl.h",
- "src/gtest-port.cc",
- "src/gtest-printers.cc",
- "src/gtest-test-part.cc",
- "src/gtest-typed-test.cc",
- "src/gtest.cc",
- ]
-
- include_dirs = [ "." ]
-
- all_dependent_configs = [ ":gtest_config" ]
- public_configs = [ ":gtest_direct_config" ]
-}
-
-source_set("gtest_main") {
- testonly = true
- sources = [
- "src/gtest_main.cc",
- ]
- deps = [
- ":gtest",
- ]
-}
diff --git a/build/secondary/third_party/libchrome/BUILD.gn b/build/secondary/third_party/libchrome/BUILD.gn
index 4d1b6bd10..48f82c6ac 100644
--- a/build/secondary/third_party/libchrome/BUILD.gn
+++ b/build/secondary/third_party/libchrome/BUILD.gn
@@ -16,12 +16,10 @@
source_set("base_sources") {
sources = [
- "base/allocator/type_profiler_control.cc",
"base/at_exit.cc",
"base/atomic_ref_count.h",
"base/atomic_sequence_num.h",
"base/atomicops.h",
- "base/atomicops_internals_x86_gcc.cc",
"base/base64.cc",
"base/base64.h",
"base/base_export.h",
@@ -56,7 +54,6 @@ source_set("base_sources") {
"base/files/scoped_temp_dir.cc",
"base/guid.cc",
"base/guid_posix.cc",
- "base/hash.cc",
"base/json/json_parser.cc",
"base/json/json_reader.cc",
"base/json/json_string_value_serializer.cc",
@@ -72,13 +69,16 @@ source_set("base_sources") {
"base/memory/weak_ptr.cc",
"base/message_loop/incoming_task_queue.cc",
"base/message_loop/message_loop.cc",
- "base/message_loop/message_loop_proxy.cc",
- "base/message_loop/message_loop_proxy_impl.cc",
+ "base/message_loop/message_loop_task_runner.cc",
"base/message_loop/message_pump.cc",
"base/message_loop/message_pump_default.cc",
+
+ # we don't want any glib dependencies.
+ # "base/message_loop/message_pump_glib.cc",
"base/message_loop/message_pump_libevent.cc",
"base/metrics/bucket_ranges.cc",
"base/metrics/field_trial.cc",
+ "base/metrics/metrics_hashes.cc",
"base/metrics/histogram_base.cc",
"base/metrics/histogram.cc",
"base/metrics/histogram_samples.cc",
@@ -115,6 +115,7 @@ source_set("base_sources") {
"base/sequence_checker_impl.cc",
"base/sequenced_task_runner.cc",
"base/sha1_portable.cc",
+ "base/strings/pattern.cc",
"base/strings/safe_sprintf.cc",
"base/strings/string16.cc",
"base/strings/string_number_conversions.cc",
@@ -133,6 +134,7 @@ source_set("base_sources") {
"base/synchronization/waitable_event_posix.cc",
"base/sync_socket_posix.cc",
"base/sys_info.cc",
+
# TODO(armansito): For our GN builds these platform-specific implementations
# don't really make that much sense but instead of removing the line I'm
# commenting it out in case we want to re-add it later (it's included in the
@@ -142,12 +144,8 @@ source_set("base_sources") {
"base/sys_info_posix.cc",
"base/task/cancelable_task_tracker.cc",
"base/task_runner.cc",
- "base/third_party/dmg_fp/dtoa.cc",
- "base/third_party/dmg_fp/g_fmt.cc",
- "base/third_party/dynamic_annotations/dynamic_annotations.c",
"base/third_party/icu/icu_utf.cc",
"base/third_party/nspr/prtime.cc",
- "base/third_party/superfasthash/superfasthash.c",
"base/threading/non_thread_safe_impl.cc",
"base/threading/platform_thread_internal_posix.cc",
"base/threading/platform_thread_linux.cc",
@@ -174,6 +172,10 @@ source_set("base_sources") {
"base/time/tick_clock.cc",
"base/time/time.cc",
"base/time/time_posix.cc",
+ "base/trace_event/heap_profiler_allocation_context.cc",
+ "base/trace_event/heap_profiler_allocation_context_tracker.cc",
+ "base/trace_event/heap_profiler_stack_frame_deduplicator.cc",
+ "base/trace_event/heap_profiler_type_name_deduplicator.cc",
"base/trace_event/malloc_dump_provider.cc",
"base/trace_event/memory_allocator_dump.cc",
"base/trace_event/memory_allocator_dump_guid.cc",
@@ -184,29 +186,46 @@ source_set("base_sources") {
"base/trace_event/process_memory_maps_dump_provider.cc",
"base/trace_event/process_memory_totals.cc",
"base/trace_event/process_memory_totals_dump_provider.cc",
+ "base/trace_event/trace_buffer.cc",
"base/trace_event/trace_config.cc",
"base/trace_event/trace_event_argument.cc",
"base/trace_event/trace_event_impl.cc",
- "base/trace_event/trace_event_impl_constants.cc",
- "base/trace_event/trace_event_memory.cc",
"base/trace_event/trace_event_memory_overhead.cc",
"base/trace_event/trace_event_synthetic_delay.cc",
+ "base/trace_event/trace_log.cc",
+ "base/trace_event/trace_log_constants.cc",
+ "base/trace_event/trace_sampling_thread.cc",
"base/tracked_objects.cc",
"base/tracking_info.cc",
"base/values.cc",
"base/vlog.cc",
]
- defines = [ "BASE_IMPLEMENTATION" ]
+ defines = [
+ "BASE_IMPLEMENTATION",
+
+ # trick libchrome to think we're building host code within an Android checkout
+ # thanks to it no glib dependency
+ "__ANDROID_HOST__=1",
+ "OS_LINUX=1",
+ ]
include_dirs = [
"//",
"//third_party/libchrome",
+ "//third_party/libevent",
+ "//third_party/libevent/include",
"//third_party/libchrome/base",
"//third_party/modp_b64",
+ "//third_party/gtest/include",
]
}
+config("libchrome_config") {
+ # libchrome headers need to be able to find themselves.
+ include_dirs = [ "//third_party/libchrome" ]
+}
+
static_library("base") {
deps = [
":base_sources",
@@ -224,5 +243,11 @@ static_library("base") {
"-Wno-sign-promo",
]
- libs = [ "-levent", "-levent_core", "-lpthread" ]
+ libs = [
+ "-levent",
+ "-levent_core",
+ "-lpthread",
+ ]
+
+ public_configs = [ ":libchrome_config" ]
}
diff --git a/build/secondary/third_party/tinyxml2/BUILD.gn b/build/secondary/third_party/tinyxml2/BUILD.gn
deleted file mode 100644
index 335960b7e..000000000
--- a/build/secondary/third_party/tinyxml2/BUILD.gn
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# Copyright (C) 2015 Google, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-static_library("tinyxml2") {
- sources = [
- "tinyxml2.cpp"
- ]
-
- include_dirs = [ "." ]
-}
diff --git a/build/toolchain/gcc/BUILD.gn b/build/toolchain/gcc/BUILD.gn
index ecf905737..888b0158d 100644
--- a/build/toolchain/gcc/BUILD.gn
+++ b/build/toolchain/gcc/BUILD.gn
@@ -54,7 +54,8 @@ toolchain("gcc") {
soname = "{{target_output_name}}{{output_extension}}" # e.g. "libfoo.so".
rspfile = soname + ".rsp"
- command = "$cxx -shared {{ldflags}} -o $soname -Wl,-soname=$soname @$rspfile"
+ command =
+ "$cxx -shared {{ldflags}} -o $soname -Wl,-soname=$soname @$rspfile"
rspfile_content = "-Wl,--whole-archive {{inputs}} {{solibs}} -Wl,--no-whole-archive {{libs}}"
description = "SOLINK $soname"