buffet: Fix link error on arm-generic
Specialization for dbus::Property<chromeos::VariantDictionary> in
libbuffet was inlined in a header file and on ARM compiler resulted
in multiple definitions of type information for the class.
Move the actual class instantiation to a stand-alone .cc file.
BUG=None
TEST=FEATURE=test emerge-arm-generic buffet
Change-Id: I35bb25a6cc25ef6ec5e83a93f01775b16c86332f
Reviewed-on: https://chromium-review.googlesource.com/222721
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/buffet/buffet.gyp b/buffet/buffet.gyp
index db041dd..182c2fc 100644
--- a/buffet/buffet.gyp
+++ b/buffet/buffet.gyp
@@ -17,6 +17,7 @@
'libbuffet/command.cc',
'libbuffet/command_listener.cc',
'libbuffet/dbus_constants.cc',
+ 'libbuffet/private/command_property_set.cc',
],
'includes': ['../common-mk/deps.gypi'],
},
diff --git a/buffet/libbuffet/private/command_property_set.cc b/buffet/libbuffet/private/command_property_set.cc
new file mode 100644
index 0000000..65f5c5e
--- /dev/null
+++ b/buffet/libbuffet/private/command_property_set.cc
@@ -0,0 +1,7 @@
+// Copyright 2014 The Chromium OS 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 "libbuffet/private/command_property_set.h"
+
+template class dbus::Property<chromeos::VariantDictionary>;
diff --git a/buffet/libbuffet/private/command_property_set.h b/buffet/libbuffet/private/command_property_set.h
index 4a6aa1a..98387d3 100644
--- a/buffet/libbuffet/private/command_property_set.h
+++ b/buffet/libbuffet/private/command_property_set.h
@@ -16,8 +16,6 @@
namespace dbus {
// Specialize dbus::Property for chromeos::VariantDictionary type.
-template class Property<chromeos::VariantDictionary>;
-
template <>
inline bool Property<chromeos::VariantDictionary>::PopValueFromReader(
MessageReader* reader) {
@@ -29,6 +27,8 @@
MessageWriter* writer) {
chromeos::dbus_utils::AppendValueToWriterAsVariant(writer, set_value_);
}
+
+extern template class Property<chromeos::VariantDictionary>;
} // namespace dbus
namespace buffet {