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 template("python_binary_source_set") { | 5 template("python_binary_source_set") { |
6 # Only available on linux for now. | 6 # Only available on linux for now. |
7 assert(is_linux) | 7 assert(is_linux) |
8 assert(defined(invoker.cython_sources) || defined(invoker.sources)) | 8 assert(defined(invoker.cython_sources) || defined(invoker.sources)) |
9 | 9 |
10 config_name = target_name + "_python_config" | 10 config_name = target_name + "_python_config" |
(...skipping 11 matching lines...) Expand all Loading... |
22 visibility = target_visibility | 22 visibility = target_visibility |
23 script = cython_script | 23 script = cython_script |
24 sources = invoker.cython_sources | 24 sources = invoker.cython_sources |
25 outputs = [ | 25 outputs = [ |
26 cython_output, | 26 cython_output, |
27 ] | 27 ] |
28 args = [ | 28 args = [ |
29 "--cplus", | 29 "--cplus", |
30 "-I", | 30 "-I", |
31 rebase_path("//", root_build_dir), | 31 rebase_path("//", root_build_dir), |
| 32 "-I", |
| 33 rebase_path(target_gen_dir, root_build_dir), |
32 "-o", | 34 "-o", |
33 rebase_path(cython_output, root_build_dir), | 35 rebase_path(cython_output, root_build_dir), |
34 ] + rebase_path(sources, root_build_dir) | 36 ] + rebase_path(sources, root_build_dir) |
35 } | 37 } |
36 } | 38 } |
37 | 39 |
38 config(config_name) { | 40 config(config_name) { |
39 visibility = target_visibility | 41 visibility = target_visibility |
40 python_flags = "//third_party/cython/python_flags.py" | 42 python_flags = "//third_party/cython/python_flags.py" |
41 include_dirs = exec_script(python_flags, [ "--includes" ], "list lines") | 43 include_dirs = exec_script(python_flags, [ "--includes" ], "list lines") |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 "$root_out_dir/${shared_library_prefix}${shared_library_name}${shared_libr
ary_suffix}", | 152 "$root_out_dir/${shared_library_prefix}${shared_library_name}${shared_libr
ary_suffix}", |
151 ] | 153 ] |
152 outputs = [ | 154 outputs = [ |
153 output, | 155 output, |
154 ] | 156 ] |
155 deps = [ | 157 deps = [ |
156 ":$shared_library_name", | 158 ":$shared_library_name", |
157 ] | 159 ] |
158 } | 160 } |
159 } | 161 } |
OLD | NEW |