Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Unified Diff: mojo/public/tools/bindings/generators/mojom_cpp_generator.py

Issue 1641163005: [Draft] try out the idea of adding export macros for C++ bindings. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/public/tools/bindings/generators/mojom_cpp_generator.py
diff --git a/mojo/public/tools/bindings/generators/mojom_cpp_generator.py b/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
index e3288679a735b443bfb7e11132a801331281b264..eb491ab831ce2c1331e8bef1040a4e157e5fe3cf 100644
--- a/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
+++ b/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
@@ -475,6 +475,8 @@ class Generator(generator.Generator):
extra_headers = set()
for name, entry in self.typemap.iteritems():
extra_headers.update(entry["headers"])
+ if self.dll_export_include:
+ extra_headers.add(self.dll_export_include)
return list(extra_headers)
def GetJinjaExports(self):
@@ -490,6 +492,7 @@ class Generator(generator.Generator):
"interfaces": self.GetInterfaces(),
"variant": self.variant,
"extra_headers": self.GetExtraHeaders(),
+ "dll_export": self.dll_export_declaration,
}
@staticmethod

Powered by Google App Engine
This is Rietveld 408576698