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

Unified Diff: build/win/message_compiler.gni

Issue 1528093003: Disable etw_manifest in the GN Windows build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: generate but don't compile Created 5 years 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
« no previous file with comments | « base/trace_event/etw_manifest/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/win/message_compiler.gni
diff --git a/build/win/message_compiler.gni b/build/win/message_compiler.gni
index 1214898a0bd150729df3014c24b16ae1ea51c522..814eb6521e126a7d7911defd751683991a129499 100644
--- a/build/win/message_compiler.gni
+++ b/build/win/message_compiler.gni
@@ -13,14 +13,30 @@ assert(is_win, "This only runs on Windows.")
# user_mode_logging (optional bool)
# Generates user-mode logging code. Defaults to false (no logging code).
#
+# compile_generated_code (optional, deafults = true)
+# If unset or true, the generated code will be compiled and linked into
+# targets that depend on it. If set to false, the .h and .rc files will only
+# be generated.
+#
# deps, public_deps, visibility
# Normal meaning.
template("message_compiler") {
- action_name = "${target_name}_mc"
- source_set_name = target_name
+ if (defined(invoker.compile_generated_code) &&
+ !invoker.compile_generated_code) {
+ compile_generated_code = false
+ action_name = target_name
+ } else {
+ compile_generated_code = true
+ action_name = "${target_name}_mc"
+ source_set_name = target_name
+ }
action_foreach(action_name) {
- visibility = [ ":$source_set_name" ]
+ if (compile_generated_code) {
+ visibility = [ ":$source_set_name" ]
+ } else {
+ forward_variables_from(invoker, [ "visibility" ])
+ }
script = "//build/win/message_compiler.py"
@@ -60,12 +76,14 @@ template("message_compiler") {
])
}
- # Compile the generated rc file.
- source_set(source_set_name) {
- forward_variables_from(invoker, [ "visibility" ])
- sources = get_target_outputs(":$action_name")
- deps = [
- ":$action_name",
- ]
+ if (compile_generated_code) {
+ # Compile the generated rc file.
+ source_set(source_set_name) {
+ forward_variables_from(invoker, [ "visibility" ])
+ sources = get_target_outputs(":$action_name")
+ deps = [
+ ":$action_name",
+ ]
+ }
}
}
« no previous file with comments | « base/trace_event/etw_manifest/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698