aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar djsollen <djsollen@google.com>2016-04-18 12:57:35 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-18 12:57:35 -0700
commit9df5d072094544fe47f9defbd3580a4dcfbe4167 (patch)
tree775b3e84b09d7d964f3803ef9f4658ca7e236593
parent63677f4c2c8f7e60686f1c293c4a9643232f1067 (diff)
Cleanup android build files and tools
-rw-r--r--gyp/visualbench.gyp2
-rw-r--r--platform_tools/android/gyp/dependencies.gypi26
-rw-r--r--platform_tools/android/launcher/skia_launcher.cpp8
3 files changed, 2 insertions, 34 deletions
diff --git a/gyp/visualbench.gyp b/gyp/visualbench.gyp
index 371b665465..fdf0efb379 100644
--- a/gyp/visualbench.gyp
+++ b/gyp/visualbench.gyp
@@ -64,7 +64,7 @@
}],
[ 'skia_os == "android" and skia_use_sdl == 1', {
'dependencies': [
- 'android_deps.gyp:Android_VisualBenchSDL',
+ 'android_deps.gyp:Android_EntryPoint',
],
}],
],
diff --git a/platform_tools/android/gyp/dependencies.gypi b/platform_tools/android/gyp/dependencies.gypi
index e1fe783b17..86cc524b58 100644
--- a/platform_tools/android/gyp/dependencies.gypi
+++ b/platform_tools/android/gyp/dependencies.gypi
@@ -155,31 +155,5 @@
],
},
},
- {
- # This target is a dependency for VisualBench application which runs on
- # Android. Since Android requires us to load native code in shared
- # libraries, we need a common entry point to wrap around main(). Here
- # we also change the type of all would-be executables to be shared
- # libraries. The alternative would be to introduce a condition in every
- # executable target which changes to a shared library if the target OS is
- # Android. This is nicer because the switch is in one place.
- 'target_name': 'Android_VisualBenchSDL',
- 'type': 'static_library',
- 'direct_dependent_settings': {
- 'target_conditions': [
- # '_type' is an 'automatic variable' which is defined for any
- # target which defines a key-value pair with 'type' as the key (so,
- # all of them). Conditionals inside 'target_conditions' are evaluated
- # *after* all other definitions and conditionals are evaluated, so
- # we're guaranteed that '_type' will be defined when we get here.
- # For more info, see:
- # - http://code.google.com/p/gyp/wiki/InputFormatReference#Variables
- # - http://codereview.appspot.com/6353065/
- ['_type == "executable"', {
- 'type': 'shared_library',
- }],
- ],
- },
- },
]
}
diff --git a/platform_tools/android/launcher/skia_launcher.cpp b/platform_tools/android/launcher/skia_launcher.cpp
index 6cd900cbe0..f1dddb3627 100644
--- a/platform_tools/android/launcher/skia_launcher.cpp
+++ b/platform_tools/android/launcher/skia_launcher.cpp
@@ -67,11 +67,9 @@ int main(int argc, const char** argv) {
return -1;
}
- void* skiaLibrary;
-
#if defined(SKIA_DLL)
// load the local skia shared library
- skiaLibrary = load_library(appLocation, "skia_android");
+ void* skiaLibrary = load_library(appLocation, "skia_android");
if (NULL == skiaLibrary)
{
return -1;
@@ -84,10 +82,6 @@ int main(int argc, const char** argv) {
return -1;
}
-#if !defined(SKIA_DLL)
- skiaLibrary = appLibrary;
-#endif
-
// find the address of the main function
int (*app_main)(int, const char**);
*(void **) (&app_main) = dlsym(appLibrary, "main");