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 import("//build/config/android/config.gni") | 5 import("//build/config/android/config.gni") |
6 import("//build/config/sanitizers/sanitizers.gni") | 6 import("//build/config/sanitizers/sanitizers.gni") |
7 import("//build/config/zip.gni") | 7 import("//build/config/zip.gni") |
8 import("//third_party/ijar/ijar.gni") | 8 import("//third_party/ijar/ijar.gni") |
9 | 9 |
10 assert(is_android) | 10 assert(is_android) |
(...skipping 1809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1820 zip_path, | 1820 zip_path, |
1821 srcjar_path, | 1821 srcjar_path, |
1822 r_text_path, | 1822 r_text_path, |
1823 ] | 1823 ] |
1824 | 1824 |
1825 _all_resource_dirs = [] | 1825 _all_resource_dirs = [] |
1826 sources = [] | 1826 sources = [] |
1827 | 1827 |
1828 if (defined(invoker.resource_dirs)) { | 1828 if (defined(invoker.resource_dirs)) { |
1829 _all_resource_dirs += invoker.resource_dirs | 1829 _all_resource_dirs += invoker.resource_dirs |
1830 sources_build_rel = | 1830 |
1831 exec_script("//build/android/gyp/find.py", | 1831 # Speed up "gn gen" by short-circuiting the empty directory. |
1832 rebase_path(invoker.resource_dirs, root_build_dir), | 1832 if (invoker.resource_dirs != [ "//build/android/ant/empty/res" ] && |
1833 "list lines") | 1833 invoker.resource_dirs != []) { |
1834 sources += rebase_path(sources_build_rel, ".", root_build_dir) | 1834 _sources_build_rel = |
| 1835 exec_script("//build/android/gyp/find.py", |
| 1836 rebase_path(invoker.resource_dirs, root_build_dir), |
| 1837 "list lines") |
| 1838 sources += rebase_path(_sources_build_rel, ".", root_build_dir) |
| 1839 } |
1835 } | 1840 } |
1836 | 1841 |
1837 if (defined(invoker.generated_resource_dirs)) { | 1842 if (defined(invoker.generated_resource_dirs)) { |
1838 assert(defined(invoker.generated_resource_files)) | 1843 assert(defined(invoker.generated_resource_files)) |
1839 _all_resource_dirs += invoker.generated_resource_dirs | 1844 _all_resource_dirs += invoker.generated_resource_dirs |
1840 sources += invoker.generated_resource_files | 1845 sources += invoker.generated_resource_files |
1841 } | 1846 } |
1842 | 1847 |
1843 inputs = [ | 1848 inputs = [ |
1844 build_config, | 1849 build_config, |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2215 | 2220 |
2216 args = [ | 2221 args = [ |
2217 "--depfile", | 2222 "--depfile", |
2218 rebase_path(depfile, root_build_dir), | 2223 rebase_path(depfile, root_build_dir), |
2219 "--script-output-path", | 2224 "--script-output-path", |
2220 rebase_path(generated_script, root_build_dir), | 2225 rebase_path(generated_script, root_build_dir), |
2221 ] | 2226 ] |
2222 args += test_runner_args | 2227 args += test_runner_args |
2223 } | 2228 } |
2224 } | 2229 } |
OLD | NEW |