| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 win_tool_arch = "environment.x86" | 60 win_tool_arch = "environment.x86" |
| 61 idl_target_platform = "win32" | 61 idl_target_platform = "win32" |
| 62 } else if (cpu_arch == "x64") { | 62 } else if (cpu_arch == "x64") { |
| 63 win_tool_arch = "environment.x64" | 63 win_tool_arch = "environment.x64" |
| 64 idl_target_platform = "x64" | 64 idl_target_platform = "x64" |
| 65 } else { | 65 } else { |
| 66 assert(false, "Need environment for this arch") | 66 assert(false, "Need environment for this arch") |
| 67 } | 67 } |
| 68 | 68 |
| 69 args = [ | 69 args = [ |
| 70 "midl-wrapper", win_tool_arch, | 70 "midl-wrapper", |
| 71 win_tool_arch, |
| 71 rebase_path(out_dir, root_build_dir), | 72 rebase_path(out_dir, root_build_dir), |
| 72 type_library_file, | 73 type_library_file, |
| 73 header_file, | 74 header_file, |
| 74 dlldata_file, | 75 dlldata_file, |
| 75 interface_identifier_file, | 76 interface_identifier_file, |
| 76 proxy_file, | 77 proxy_file, |
| 77 "{{source}}", | 78 "{{source}}", |
| 78 "/char", "signed", | 79 "/char", |
| 79 "/env", idl_target_platform, | 80 "signed", |
| 81 "/env", |
| 82 idl_target_platform, |
| 80 "/Oicf", | 83 "/Oicf", |
| 81 ] | 84 ] |
| 82 | 85 |
| 83 foreach(include, system_include_dirs) { | 86 foreach(include, system_include_dirs) { |
| 84 args += [ "/I", include ] | 87 args += [ |
| 88 "/I", |
| 89 include, |
| 90 ] |
| 85 } | 91 } |
| 86 } | 92 } |
| 87 | 93 |
| 88 source_set(target_name) { | 94 source_set(target_name) { |
| 89 if (defined(invoker.visibility)) { | 95 if (defined(invoker.visibility)) { |
| 90 visibility = invoker.visibility | 96 visibility = invoker.visibility |
| 91 } | 97 } |
| 92 | 98 |
| 93 # We only compile the IID files from the IDL tool rather than all outputs. | 99 # We only compile the IID files from the IDL tool rather than all outputs. |
| 94 sources = process_file_template( | 100 sources = process_file_template(invoker.sources, |
| 95 invoker.sources, | 101 [ "$out_dir/$interface_identifier_file" ]) |
| 96 [ "$out_dir/$interface_identifier_file" ]) | |
| 97 | 102 |
| 98 deps = [ ":$action_name" ] | 103 deps = [ |
| 104 ":$action_name", |
| 105 ] |
| 99 } | 106 } |
| 100 } | 107 } |
| OLD | NEW |