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 # The absolute path to the directory containing the mojo public SDK (i.e., the | 5 # The absolute path to the directory containing the mojo public SDK (i.e., the |
6 # directory containing mojo/public). The build files within the Mojo public | 6 # directory containing mojo/public). The build files within the Mojo public |
7 # SDK use this variable to allow themselves to be parameterized by the location | 7 # SDK use this variable to allow themselves to be parameterized by the location |
8 # of the public SDK within a client repo. | 8 # of the public SDK within a client repo. |
9 mojo_root = get_path_info("../..", "abspath") | 9 mojo_root = get_path_info("../..", "abspath") |
10 | 10 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 } | 108 } |
109 | 109 |
110 deps = [] | 110 deps = [] |
111 if (defined(invoker.deps)) { | 111 if (defined(invoker.deps)) { |
112 foreach(dep, invoker.deps) { | 112 foreach(dep, invoker.deps) { |
113 if (restrict_external_deps) { | 113 if (restrict_external_deps) { |
114 # The only deps that are not specified relative to the location of | 114 # The only deps that are not specified relative to the location of |
115 # the Mojo SDK should be on targets within the same file or on a | 115 # the Mojo SDK should be on targets within the same file or on a |
116 # whitelisted set of external dependencies. | 116 # whitelisted set of external dependencies. |
117 dep_dir = get_path_info(dep, "dir") | 117 dep_dir = get_path_info(dep, "dir") |
118 assert(dep_dir == "." || dep == "//testing/gtest" || | 118 assert(dep_dir == "." || (dep == "//dart/runtime:libdart" && |
119 (dep == "//dart/runtime:libdart" && | 119 target_name == "mojo_internal_impl")) |
120 target_name == "mojo_internal_impl")) | |
121 } | 120 } |
122 deps += [ dep ] | 121 deps += [ dep ] |
123 } | 122 } |
124 } | 123 } |
125 if (defined(invoker.mojo_sdk_deps)) { | 124 if (defined(invoker.mojo_sdk_deps)) { |
126 foreach(sdk_dep, invoker.mojo_sdk_deps) { | 125 foreach(sdk_dep, invoker.mojo_sdk_deps) { |
127 # Check that the SDK dep was not mistakenly given as an absolute path. | 126 # Check that the SDK dep was not mistakenly given as an absolute path. |
128 assert(get_path_info(sdk_dep, "abspath") != sdk_dep) | 127 assert(get_path_info(sdk_dep, "abspath") != sdk_dep) |
129 deps += [ rebase_path(sdk_dep, ".", mojo_root) ] | 128 deps += [ rebase_path(sdk_dep, ".", mojo_root) ] |
130 } | 129 } |
131 } | 130 } |
132 } | 131 } |
133 } | 132 } |
OLD | NEW |