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

Unified Diff: mojo/public/tools/bindings/mojom.gni

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/mojom.gni
diff --git a/mojo/public/tools/bindings/mojom.gni b/mojo/public/tools/bindings/mojom.gni
index 9cd72173a0aa9d7fc8728028eb34f96aa8e42b72..650dbd81ef978306a26a1cb090d248ec3b1d9022 100644
--- a/mojo/public/tools/bindings/mojom.gni
+++ b/mojo/public/tools/bindings/mojom.gni
@@ -58,6 +58,11 @@ mojom_generator_sources = [
# testonly (optional)
#
# visibility (optional)
+#
+# TODO(yzshen): add comments.
+# cpp_dll_export_declaration (optional)
+# cpp_dll_export_include (optional)
+# cpp_configs (optional)
template("mojom") {
assert(
defined(invoker.sources) || defined(invoker.deps) ||
@@ -145,6 +150,20 @@ template("mojom") {
]
}
}
+
+ if (defined(invoker.dll_export_declaration)) {
+ args += [
+ "--dll_export_declaration",
+ invoker.dll_export_declaration,
+ ]
+ }
+
+ if (defined(invoker.dll_export_include)) {
+ args += [
+ "--dll_export_include",
+ invoker.dll_export_include,
+ ]
+ }
}
}
@@ -208,6 +227,10 @@ template("mojom") {
# this target *except* mojo/public/cpp/bindings and other *_cpp_sources
# targets.
source_set(cpp_sources_target_name) {
+ if (defined(invoker.cpp_configs)) {
+ configs += invoker.cpp_configs
+ }
+
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
« no previous file with comments | « mojo/public/tools/bindings/generators/mojom_cpp_generator.py ('k') | mojo/public/tools/bindings/mojom_bindings_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698