summaryrefslogtreecommitdiffstats
path: root/native_client_sdk/src/tests/sdk_util_test
diff options
context:
space:
mode:
authorsbc <sbc@chromium.org>2015-10-23 18:20:59 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-24 01:22:01 +0000
commit95ffabc8eb818b26009f0eff87db5be3ec1487a0 (patch)
tree2c5c7ff7def6ea9d3acf728d260364e8b5bc71cd /native_client_sdk/src/tests/sdk_util_test
parent939f64cf8b666cb2c1dbb777193b4ee4f1e52236 (diff)
downloadchromium_src-95ffabc8eb818b26009f0eff87db5be3ec1487a0.zip
chromium_src-95ffabc8eb818b26009f0eff87db5be3ec1487a0.tar.gz
chromium_src-95ffabc8eb818b26009f0eff87db5be3ec1487a0.tar.bz2
[NaCl SDK] Allow ppapi_simple apps to use main entry point.
This change makes ppapi_simple into a linker script since we need to force the __nacl_main symbol to be included in the link line (its weak referenced by _start as a replacement for main). CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:linux_nacl_sdk;tryserver.chromium.mac:mac_nacl_sdk;tryserver.chromium.win:win_nacl_sdk BUG=246246 Review URL: https://codereview.chromium.org/18435011 Cr-Commit-Position: refs/heads/master@{#355947}
Diffstat (limited to 'native_client_sdk/src/tests/sdk_util_test')
-rw-r--r--native_client_sdk/src/tests/sdk_util_test/example.dsc4
-rw-r--r--native_client_sdk/src/tests/sdk_util_test/main.cc6
2 files changed, 2 insertions, 8 deletions
diff --git a/native_client_sdk/src/tests/sdk_util_test/example.dsc b/native_client_sdk/src/tests/sdk_util_test/example.dsc
index 63b89ba..334d1da 100644
--- a/native_client_sdk/src/tests/sdk_util_test/example.dsc
+++ b/native_client_sdk/src/tests/sdk_util_test/example.dsc
@@ -10,9 +10,7 @@
'main.cc',
'string_util_test.cc',
],
- 'DEPS': ['ppapi_simple', 'sdk_util', 'nacl_io'],
- # Order matters here: gtest has a "main" function that will be used if
- # referenced before ppapi.
+ 'DEPS': ['ppapi_simple_cpp', 'sdk_util', 'nacl_io'],
'LIBS': ['ppapi_simple_cpp', 'ppapi_cpp', 'gmock', 'nacl_io', 'ppapi', 'gtest', 'pthread'],
'CXXFLAGS': ['-Wno-sign-compare']
}
diff --git a/native_client_sdk/src/tests/sdk_util_test/main.cc b/native_client_sdk/src/tests/sdk_util_test/main.cc
index a715b1b..eb2a8ea 100644
--- a/native_client_sdk/src/tests/sdk_util_test/main.cc
+++ b/native_client_sdk/src/tests/sdk_util_test/main.cc
@@ -42,7 +42,7 @@ class GTestEventListener : public ::testing::EmptyTestEventListener {
}
};
-int example_main(int argc, char* argv[]) {
+int main(int argc, char* argv[]) {
::testing::InitGoogleTest(&argc, argv);
if (PSGetInstanceId() != 0) {
::testing::UnitTest::GetInstance()->listeners()
@@ -50,7 +50,3 @@ int example_main(int argc, char* argv[]) {
}
return RUN_ALL_TESTS();
}
-
-// Register the function to call once the Instance Object is initialized.
-// see: pappi_simple/ps_main.h
-PPAPI_SIMPLE_REGISTER_MAIN(example_main);