OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 assert(is_win) | 5 assert(is_win) |
6 | 6 |
7 import("//build/config/win/visual_studio_version.gni") | 7 import("//build/config/win/visual_studio_version.gni") |
8 | 8 |
9 # This template defines a rule to invoke the MS IDL compiler. | 9 # This template defines a rule to invoke the MS IDL compiler. |
10 # | 10 # |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 interface_identifier_file, | 77 interface_identifier_file, |
78 proxy_file, | 78 proxy_file, |
79 "{{source}}", | 79 "{{source}}", |
80 "/char", | 80 "/char", |
81 "signed", | 81 "signed", |
82 "/env", | 82 "/env", |
83 idl_target_platform, | 83 idl_target_platform, |
84 "/Oicf", | 84 "/Oicf", |
85 ] | 85 ] |
86 | 86 |
87 if (defined(invoker.deps)) { | 87 forward_variables_from(invoker, [ "deps" ]) |
88 deps = invoker.deps | |
89 } | |
90 } | 88 } |
91 | 89 |
92 source_set(target_name) { | 90 source_set(target_name) { |
93 if (defined(invoker.visibility)) { | 91 forward_variables_from(invoker, [ "visibility" ]) |
94 visibility = invoker.visibility | |
95 } | |
96 | 92 |
97 # We only compile the IID files from the IDL tool rather than all outputs. | 93 # We only compile the IID files from the IDL tool rather than all outputs. |
98 sources = process_file_template(invoker.sources, | 94 sources = process_file_template(invoker.sources, |
99 [ "$out_dir/$interface_identifier_file" ]) | 95 [ "$out_dir/$interface_identifier_file" ]) |
100 | 96 |
101 public_deps = [ | 97 public_deps = [ |
102 ":$action_name", | 98 ":$action_name", |
103 ] | 99 ] |
104 | 100 |
105 config("midl_warnings") { | 101 configs += [ "//build/config/win:midl_warnings" ] |
106 if (is_clang) { | |
107 # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_" | |
108 cflags = [ "-Wno-extra-tokens" ] | |
109 } | |
110 } | |
111 configs += [ ":midl_warnings" ] | |
112 } | 102 } |
113 } | 103 } |
OLD | NEW |