summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphosek <phosek@chromium.org>2016-01-14 15:22:51 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-14 23:23:51 +0000
commitd07c771832f9dc9ee1957a7ccf467df4f48a360a (patch)
treeba46344e403c1345a758664bc0e5e2bf39da8ae1
parent1fb84154cb338bcf295346ecd938b75865ade649 (diff)
downloadchromium_src-d07c771832f9dc9ee1957a7ccf467df4f48a360a.zip
chromium_src-d07c771832f9dc9ee1957a7ccf467df4f48a360a.tar.gz
chromium_src-d07c771832f9dc9ee1957a7ccf467df4f48a360a.tar.bz2
GN: Only link libppapi_cpp.so where necessary
Some tests check the libraries and symbols linked into the nexe and to make these pass, we need to replicate the GYP behavior. BUG=462791 Review URL: https://codereview.chromium.org/1583043002 Cr-Commit-Position: refs/heads/master@{#369604}
-rw-r--r--chrome/test/data/nacl/BUILD.gn15
-rw-r--r--chrome/test/data/nacl/exit_status/pm_exit_status_test.cc1
-rw-r--r--chrome/test/data/nacl/sysconf_nprocessors_onln/sysconf_nprocessors_onln_test.cc1
-rw-r--r--ppapi/native_client/nacl_test_data.gni5
4 files changed, 21 insertions, 1 deletions
diff --git a/chrome/test/data/nacl/BUILD.gn b/chrome/test/data/nacl/BUILD.gn
index beb8da5..ac50533 100644
--- a/chrome/test/data/nacl/BUILD.gn
+++ b/chrome/test/data/nacl/BUILD.gn
@@ -172,6 +172,11 @@ if (is_nacl && !is_nacl_nonsfi) {
sources = [
"simple.cc",
]
+ if (is_nacl_glibc) {
+ deps = [
+ "//ppapi:ppapi_cpp_lib_shared",
+ ]
+ }
destination_dir = "nacl_test_data"
test_files = [ "nacl_load_test.html" ]
}
@@ -181,6 +186,11 @@ if (is_nacl && !is_nacl_nonsfi) {
sources = [
"exit_status/pm_exit_status_test.cc",
]
+ if (is_nacl_glibc) {
+ deps = [
+ "//ppapi:ppapi_cpp_lib_shared",
+ ]
+ }
destination_dir = "nacl_test_data"
test_files = [ "exit_status/pm_exit_status_test.html" ]
}
@@ -218,6 +228,11 @@ if (is_nacl && !is_nacl_nonsfi) {
sources = [
"sysconf_nprocessors_onln/sysconf_nprocessors_onln_test.cc",
]
+ if (is_nacl_glibc) {
+ deps = [
+ "//ppapi:ppapi_cpp_lib_shared",
+ ]
+ }
destination_dir = "nacl_test_data"
test_files =
[ "sysconf_nprocessors_onln/sysconf_nprocessors_onln_test.html" ]
diff --git a/chrome/test/data/nacl/exit_status/pm_exit_status_test.cc b/chrome/test/data/nacl/exit_status/pm_exit_status_test.cc
index 4335f67..0254f38 100644
--- a/chrome/test/data/nacl/exit_status/pm_exit_status_test.cc
+++ b/chrome/test/data/nacl/exit_status/pm_exit_status_test.cc
@@ -126,6 +126,7 @@ class MyModule : public pp::Module {
namespace pp {
// Factory function for your specialization of the Module object.
+__attribute__((visibility("default")))
Module* CreateModule() {
printf("hello world from CreateModule\n"); fflush(NULL);
return new MyModule();
diff --git a/chrome/test/data/nacl/sysconf_nprocessors_onln/sysconf_nprocessors_onln_test.cc b/chrome/test/data/nacl/sysconf_nprocessors_onln/sysconf_nprocessors_onln_test.cc
index 09798bd..4c7355da 100644
--- a/chrome/test/data/nacl/sysconf_nprocessors_onln/sysconf_nprocessors_onln_test.cc
+++ b/chrome/test/data/nacl/sysconf_nprocessors_onln/sysconf_nprocessors_onln_test.cc
@@ -110,6 +110,7 @@ class MyModule : public pp::Module {
namespace pp {
// Factory function for your specialization of the Module object.
+__attribute__((visibility("default")))
Module* CreateModule() {
return new MyModule();
}
diff --git a/ppapi/native_client/nacl_test_data.gni b/ppapi/native_client/nacl_test_data.gni
index 265e4a0..8b2e7a1 100644
--- a/ppapi/native_client/nacl_test_data.gni
+++ b/ppapi/native_client/nacl_test_data.gni
@@ -90,9 +90,12 @@ template("nacl_test_data") {
"libs",
])
deps = [
- "//ppapi:ppapi_cpp_lib",
+ "//build/config/nacl:nacl_base",
"//ppapi/native_client:ppapi_lib",
]
+ if (!is_nacl_glibc) {
+ deps += [ "//ppapi:ppapi_cpp_lib" ]
+ }
ldflags = [ "-pthread" ]
if (defined(invoker.deps)) {
deps += invoker.deps