Chromium Code Reviews| Index: ppapi/BUILD.gn |
| diff --git a/ppapi/BUILD.gn b/ppapi/BUILD.gn |
| index 22498434f42217d2aecd25b867fab07a5beab19f..98fc7f89cc20c23411e662b1d484f7cdb036c780 100644 |
| --- a/ppapi/BUILD.gn |
| +++ b/ppapi/BUILD.gn |
| @@ -145,11 +145,20 @@ executable("pepper_hash_for_uma") { |
| } |
| source_set("ppapi_cpp_lib") { |
| + if (is_posix) { |
| + configs -= [ "//build/config/gcc:symbol_visibility_hidden" ] |
| + } |
| sources = ppapi_sources.cpp_source_files |
| sources += [ |
| "cpp/module_embedder.h", |
| "cpp/ppp_entrypoints.cc", |
| ] |
| + if (is_nacl) { |
| + cflags = [ "-fPIC" ] |
| + } |
| + deps = [ |
| + "//build/config/nacl:nacl_base", |
|
brettw
2015/09/10 05:02:50
I think you mean to put this inside the is_nacl bl
Petr Hosek
2015/09/11 22:10:49
Done.
|
| + ] |
| } |
| source_set("ppapi_gles2_lib") { |
| @@ -166,11 +175,14 @@ source_set("ppapi_gles2_lib") { |
| if (enable_nacl) { |
| if (is_nacl) { |
| - executable("ppapi_nacl_tests_newlib") { |
| - include_dirs = [ |
| - "lib/gl/include", |
| - "..", |
| + shared_library("ppapi_cpp_lib_shared") { |
| + deps = [ |
| + ":ppapi_cpp_lib", |
| ] |
| + } |
| + |
| + executable("ppapi_nacl_tests_newlib") { |
| + include_dirs = [ "lib/gl/include" ] |
| sources = ppapi_sources.test_common_source_files + |
| ppapi_sources.test_nacl_source_files |
| @@ -183,6 +195,25 @@ if (enable_nacl) { |
| ] |
| } |
| + executable("ppapi_nacl_tests_glibc") { |
| + configs -= [ "//build/config/gcc:symbol_visibility_hidden" ] |
| + |
| + include_dirs = [ "lib/gl/include" ] |
| + |
| + sources = ppapi_sources.test_common_source_files + |
| + ppapi_sources.test_nacl_source_files |
| + |
| + defines = [ "GL_GLEXT_PROTOTYPES" ] |
| + |
| + ldflags = [ "-pthread" ] |
| + |
| + deps = [ |
| + ":ppapi_cpp_lib_shared", |
| + "//ppapi/native_client/src/untrusted/irt_stub:ppapi_stub_lib", |
| + "//build/config/nacl:nacl_base", |
| + ] |
| + } |
| + |
| copy("nacl_tests_copy") { |
| sources = [ |
| "${root_out_dir}/ppapi_nacl_tests_newlib.nexe", |
| @@ -194,12 +225,60 @@ if (enable_nacl) { |
| ":ppapi_nacl_tests_newlib", |
| ] |
| } |
| + |
| + copy("nacl_glibc_tests_copy") { |
| + sources = [ |
| + "${root_out_dir}/ppapi_nacl_tests_glibc.nexe", |
| + ] |
| + outputs = [ |
| + "${root_build_dir}/{{source_name_part}}_${target_cpu}.nexe", |
|
brettw
2015/09/10 05:02:50
Actually, I just realized how this should really w
Petr Hosek
2015/09/10 06:25:31
I'm fine to fix it even in this change. Shall I in
Dirk Pranke
2015/09/10 22:27:21
You'll still need the target outputs to have "glib
Petr Hosek
2015/09/11 22:10:49
Done.
|
| + ] |
| + deps = [ |
| + ":ppapi_nacl_tests_glibc", |
| + ] |
| + } |
| + |
| + nacl_toolchain_dir = rebase_path("//native_client/toolchain") |
| + os_toolchain_dir = "${nacl_toolchain_dir}/${host_os}_x86" |
| + glibc_toolchain_dir = "${os_toolchain_dir}/nacl_x86_glibc" |
| + |
| + action("generate_glibc_nmf") { |
| + glibc_nmf = "${root_build_dir}/ppapi_nacl_tests_glibc.nmf" |
| + script = "//native_client_sdk/src/tools/create_nmf.py" |
| + sources = get_target_outputs(":nacl_glibc_tests_copy") |
| + outputs = [ |
| + glibc_nmf, |
| + ] |
| + glibc_nmf_flags = [ "--library-path=" + rebase_path(root_out_dir) ] |
| + if (current_cpu == "x86") { |
| + libdir_glibc32 = "${glibc_toolchain_dir}/x86_64-nacl/lib32" |
| + glibc_nmf_flags += |
| + [ "--library-path=" + rebase_path(libdir_glibc32, root_build_dir) ] |
| + } |
| + if (target_cpu == "x64" || (target_cpu == "x86" && is_win)) { |
| + libdir_glibc64 = "${glibc_toolchain_dir}/x86_64-nacl/lib" |
| + glibc_nmf_flags += |
| + [ "--library-path=" + rebase_path(libdir_glibc64, root_build_dir) ] |
| + } |
| + args = [ |
| + "--no-default-libpath", |
| + "--objdump=${glibc_toolchain_dir}/bin/x86_64-nacl-objdump", |
| + "--output=" + rebase_path(glibc_nmf, root_build_dir), |
| + "--stage-dependencies=" + rebase_path(root_build_dir), |
| + ] + glibc_nmf_flags + rebase_path(sources, root_build_dir) |
| + deps = [ |
| + ":nacl_glibc_tests_copy", |
| + ] |
| + } |
| } |
| group("ppapi_nacl_tests") { |
| deps = [] |
| if (target_cpu == "x86" || target_cpu == "x64") { |
| - deps += [ ":nacl_tests_copy(//build/toolchain/nacl:clang_newlib_${target_cpu})" ] |
| + deps += [ |
| + ":nacl_tests_copy(//build/toolchain/nacl:clang_newlib_${target_cpu})", |
| + ":generate_glibc_nmf(//build/toolchain/nacl:glibc_${target_cpu})", |
| + ] |
| } |
| } |
| } |