Chromium Code Reviews| 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 copy("copy_test_files") { | 5 copy("copy_test_files") { |
| 6 visibility = [ ":*" ] | 6 visibility = [ ":*" ] |
| 7 sources = [ | 7 sources = [ |
| 8 # Keep "test_case.html.mock-http-headers" with "test_case.html". | 8 # Keep "test_case.html.mock-http-headers" with "test_case.html". |
| 9 "tests/ppapi_nacl_tests_newlib.nmf", | 9 "tests/ppapi_nacl_tests_newlib.nmf", |
| 10 "tests/test_case.html", | 10 "tests/test_case.html", |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 145 } | 145 } |
| 146 | 146 |
| 147 source_set("ppapi_cpp_lib") { | 147 source_set("ppapi_cpp_lib") { |
| 148 sources = ppapi_sources.cpp_source_files | 148 sources = ppapi_sources.cpp_source_files |
| 149 sources += [ | 149 sources += [ |
| 150 "cpp/module_embedder.h", | 150 "cpp/module_embedder.h", |
| 151 "cpp/ppp_entrypoints.cc", | 151 "cpp/ppp_entrypoints.cc", |
| 152 ] | 152 ] |
| 153 } | 153 } |
| 154 | 154 |
| 155 shared_library("ppapi_cpp_lib_shared") { | |
| 156 configs -= [ "//build/config/gcc:symbol_visibility_hidden" ] | |
|
brettw
2015/09/09 21:08:45
This needs to be inside
if (is_posix) { ... }
to
Petr Hosek
2015/09/09 22:14:50
Done.
| |
| 157 sources = ppapi_sources.cpp_source_files | |
| 158 sources += [ | |
| 159 "cpp/module_embedder.h", | |
| 160 "cpp/ppp_entrypoints.cc", | |
| 161 ] | |
| 162 cflags = [ "-fPIC" ] | |
|
Dirk Pranke
2015/09/09 20:00:35
Presumably this is a linux/unix- specific flag and
Petr Hosek
2015/09/09 20:55:55
Actually, this is NaCl specific. After checking th
brettw
2015/09/09 21:08:45
This should be set already for Linux so you can ju
brettw
2015/09/09 21:19:19
Actually, this whole target is suspicious. ppapi_s
Petr Hosek
2015/09/09 22:14:49
Done.
| |
| 163 deps = [ | |
| 164 "//build/config/nacl:nacl_base", | |
| 165 ] | |
| 166 } | |
| 167 | |
| 155 source_set("ppapi_gles2_lib") { | 168 source_set("ppapi_gles2_lib") { |
| 156 include_dirs = [ "lib/gl/include" ] | 169 include_dirs = [ "lib/gl/include" ] |
| 157 sources = [ | 170 sources = [ |
| 158 "lib/gl/gles2/gl2ext_ppapi.c", | 171 "lib/gl/gles2/gl2ext_ppapi.c", |
| 159 "lib/gl/gles2/gl2ext_ppapi.h", | 172 "lib/gl/gles2/gl2ext_ppapi.h", |
| 160 "lib/gl/gles2/gles2.c", | 173 "lib/gl/gles2/gles2.c", |
| 161 ] | 174 ] |
| 162 deps = [ | 175 deps = [ |
| 163 "//ppapi/cpp", | 176 "//ppapi/cpp", |
| 164 ] | 177 ] |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 176 ppapi_sources.test_nacl_source_files | 189 ppapi_sources.test_nacl_source_files |
| 177 | 190 |
| 178 defines = [ "GL_GLEXT_PROTOTYPES" ] | 191 defines = [ "GL_GLEXT_PROTOTYPES" ] |
| 179 | 192 |
| 180 deps = [ | 193 deps = [ |
| 181 ":ppapi_cpp_lib", | 194 ":ppapi_cpp_lib", |
| 182 "//ppapi/native_client:ppapi_lib", | 195 "//ppapi/native_client:ppapi_lib", |
| 183 ] | 196 ] |
| 184 } | 197 } |
| 185 | 198 |
| 199 executable("ppapi_nacl_tests_glibc") { | |
| 200 configs -= [ "//build/config/gcc:symbol_visibility_hidden" ] | |
| 201 | |
| 202 include_dirs = [ | |
| 203 "lib/gl/include", | |
| 204 "..", | |
|
brettw
2015/09/09 21:08:45
Remove this, it's automatic in GN. Can you also re
Petr Hosek
2015/09/09 22:14:50
Done.
| |
| 205 ] | |
| 206 | |
| 207 sources = ppapi_sources.test_common_source_files + | |
| 208 ppapi_sources.test_nacl_source_files | |
| 209 | |
| 210 defines = [ "GL_GLEXT_PROTOTYPES" ] | |
| 211 | |
| 212 ldflags = [ "-pthread" ] | |
|
Dirk Pranke
2015/09/09 20:00:35
same comment: presumably this will also need to ch
Petr Hosek
2015/09/09 20:55:55
ditto
| |
| 213 | |
| 214 deps = [ | |
| 215 ":ppapi_cpp_lib_shared", | |
| 216 "//ppapi/native_client/src/untrusted/irt_stub:ppapi_stub_lib", | |
| 217 "//build/config/nacl:nacl_base", | |
| 218 ] | |
| 219 } | |
| 220 | |
| 186 copy("nacl_tests_copy") { | 221 copy("nacl_tests_copy") { |
| 187 sources = [ | 222 sources = [ |
| 188 "${root_out_dir}/ppapi_nacl_tests_newlib.nexe", | 223 "${root_out_dir}/ppapi_nacl_tests_newlib.nexe", |
| 189 ] | 224 ] |
| 190 outputs = [ | 225 outputs = [ |
| 191 "${root_build_dir}/{{source_name_part}}_${target_cpu}.nexe", | 226 "${root_build_dir}/{{source_name_part}}_${target_cpu}.nexe", |
| 192 ] | 227 ] |
| 193 deps = [ | 228 deps = [ |
| 194 ":ppapi_nacl_tests_newlib", | 229 ":ppapi_nacl_tests_newlib", |
| 195 ] | 230 ] |
| 196 } | 231 } |
| 232 | |
| 233 copy("nacl_glibc_tests_copy") { | |
| 234 sources = [ | |
| 235 "${root_out_dir}/ppapi_nacl_tests_glibc.nexe", | |
| 236 ] | |
| 237 outputs = [ | |
| 238 "${root_build_dir}/{{source_name_part}}_${target_cpu}.nexe", | |
| 239 ] | |
| 240 deps = [ | |
| 241 ":ppapi_nacl_tests_glibc", | |
| 242 ] | |
| 243 } | |
| 244 | |
| 245 # TODO(phosek): We should really use toolchain_package from the toolchain | |
| 246 # definition, but there is currently no way to access that variable. | |
| 247 import("//build/config/nacl/nacl.gni") | |
| 248 glibc_toolchain_dir = "${os_toolchain_dir}/nacl_x86_glibc" | |
| 249 create_nmf = rebase_path("//native_client_sdk/src/tools/create_nmf.py") | |
| 250 create_nmf_flags = [ | |
| 251 "--no-default-libpath", | |
| 252 "--objdump=${glibc_toolchain_dir}/bin/x86_64-nacl-objdump", | |
| 253 ] | |
| 254 | |
| 255 action("generate_glibc_nmf") { | |
| 256 glibc_nmf = "${root_build_dir}/ppapi_nacl_tests_glibc.nmf" | |
| 257 script = create_nmf | |
|
brettw
2015/09/09 21:08:45
Since you only use this var once, inline it here.
Petr Hosek
2015/09/09 22:14:49
I'm going to be using it in the future for PNaCl a
| |
| 258 sources = get_target_outputs(":nacl_glibc_tests_copy") | |
| 259 outputs = [ | |
| 260 glibc_nmf, | |
| 261 ] | |
| 262 glibc_nmf_flags = [ "--library-path=" + rebase_path(root_out_dir) ] | |
| 263 if (current_cpu == "x86") { | |
| 264 libdir_glibc32 = "${glibc_toolchain_dir}/x86_64-nacl/lib32" | |
| 265 glibc_nmf_flags += | |
| 266 [ "--library-path=" + rebase_path(libdir_glibc32, root_build_dir) ] | |
| 267 } | |
| 268 if (target_cpu == "x64" || (target_cpu == "x86" && is_win)) { | |
| 269 libdir_glibc64 = "${glibc_toolchain_dir}/x86_64-nacl/lib" | |
| 270 glibc_nmf_flags += | |
| 271 [ "--library-path=" + rebase_path(libdir_glibc64, root_build_dir) ] | |
| 272 } | |
| 273 args = [ | |
| 274 "--output=" + rebase_path(glibc_nmf, root_build_dir), | |
| 275 "--stage-dependencies=" + rebase_path(root_build_dir), | |
| 276 ] + create_nmf_flags + glibc_nmf_flags + | |
|
brettw
2015/09/09 21:08:45
Since this is only used once, can you delete the c
Petr Hosek
2015/09/09 22:14:49
There is going to be another invocation in the fut
| |
| 277 rebase_path(sources, root_build_dir) | |
| 278 deps = [ | |
| 279 ":nacl_glibc_tests_copy", | |
| 280 ] | |
| 281 } | |
| 197 } | 282 } |
| 198 | 283 |
| 199 group("ppapi_nacl_tests") { | 284 group("ppapi_nacl_tests") { |
| 200 deps = [] | 285 deps = [] |
| 201 if (target_cpu == "x86" || target_cpu == "x64") { | 286 if (target_cpu == "x86" || target_cpu == "x64") { |
| 202 deps += [ ":nacl_tests_copy(//build/toolchain/nacl:clang_newlib_${target_c pu})" ] | 287 deps += [ |
| 288 ":nacl_tests_copy(//build/toolchain/nacl:clang_newlib_${target_cpu})", | |
| 289 ":generate_glibc_nmf(//build/toolchain/nacl:glibc_${target_cpu})", | |
| 290 ] | |
| 203 } | 291 } |
| 204 } | 292 } |
| 205 } | 293 } |
| OLD | NEW |