Adds base/component_export.h with a parameterized COMPONENT_EXPORT macro
to be used in place of traditional custom export headers and
definitions.
Originally discussed on https://goo.gl/bHPA4U
Usage is straightforward:
C++ header:
#include "base/component_export.h"
class COMPONENT_EXPORT(MY_COMPONENT) MyClass {};
GN component target:
component("my_component") {
sources = [ ... ]
defines = [ "IS_MY_COMPONENT_IMPL" ]
}
This CL also uses the new header to replace the custom //ipc
export header as a minimal proof-of-concept.
Bug: None
Test: ipc-dependent targets compile & link in component and non-component builds
Change-Id: I4189c6456d2c61944e6c704660ab52b5f4def984
Reviewed-on: https://chromium-review.googlesource.com/876884
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ken Rockot <rockot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531136}