summaryrefslogtreecommitdiff
path: root/deps/v8/build/android/BUILD.gn
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-08-07 22:45:47 +0200
committerFlorian Dold <florian.dold@gmail.com>2019-08-07 22:45:47 +0200
commit65e39b7046a29aa299f06285441b62bcf1e4df01 (patch)
tree2eb012aabb59533b954aa169199733292de336cf /deps/v8/build/android/BUILD.gn
parent936cd90b7def6ef7c1e0b80265a9dc77a9ad23c6 (diff)
downloadandroid-node-v8-65e39b7046a29aa299f06285441b62bcf1e4df01.tar.gz
android-node-v8-65e39b7046a29aa299f06285441b62bcf1e4df01.tar.bz2
android-node-v8-65e39b7046a29aa299f06285441b62bcf1e4df01.zip
Move v8/build into this repository.
Since we need to patch some files, we don't let depot_tools manage these files anymore. build.git commit a0b2e3b2708bcf81ec00ac1738b586bcc5e04eea
Diffstat (limited to 'deps/v8/build/android/BUILD.gn')
-rw-r--r--deps/v8/build/android/BUILD.gn135
1 files changed, 135 insertions, 0 deletions
diff --git a/deps/v8/build/android/BUILD.gn b/deps/v8/build/android/BUILD.gn
new file mode 100644
index 0000000000..f864430562
--- /dev/null
+++ b/deps/v8/build/android/BUILD.gn
@@ -0,0 +1,135 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/android/config.gni")
+import("//build/config/android/rules.gni")
+import("//build/config/python.gni")
+
+if (enable_java_templates) {
+ sun_tools_jar_path = "$root_gen_dir/sun_tools_jar/tools.jar"
+
+ # Create or update the API versions cache if necessary by running a
+ # functionally empty lint task. This prevents racy creation of the
+ # cache while linting java targets in android_lint.
+ android_lint("prepare_android_lint_cache") {
+ android_manifest = "//build/android/AndroidManifest.xml"
+ create_cache = true
+ }
+
+ action("find_sun_tools_jar") {
+ script = "//build/android/gyp/find_sun_tools_jar.py"
+ depfile = "$target_gen_dir/$target_name.d"
+ outputs = [
+ sun_tools_jar_path,
+ ]
+ args = [
+ "--depfile",
+ rebase_path(depfile, root_build_dir),
+ "--output",
+ rebase_path(sun_tools_jar_path, root_build_dir),
+ ]
+ }
+
+ java_prebuilt("sun_tools_java") {
+ jar_path = sun_tools_jar_path
+ deps = [
+ ":find_sun_tools_jar",
+ ]
+ }
+
+ # Write to a file some GN vars that are useful to scripts that use the output
+ # directory. Format is chosen as easliy importable by both python and bash.
+ _lines = [
+ "android_sdk_build_tools=" +
+ rebase_path(android_sdk_build_tools, root_build_dir),
+ "android_sdk_build_tools_version=$android_sdk_build_tools_version",
+ "android_sdk_tools_version_suffix=$android_sdk_tools_version_suffix",
+ "android_sdk_root=" + rebase_path(android_sdk_root, root_build_dir),
+ "android_sdk_version=$android_sdk_version",
+ "android_ndk_root=" + rebase_path(android_ndk_root, root_build_dir),
+ "android_tool_prefix=" + rebase_path(android_tool_prefix, root_build_dir),
+ ]
+ if (defined(android_secondary_abi_cpu)) {
+ _secondary_label_info =
+ get_label_info(":foo($android_secondary_abi_toolchain)", "root_out_dir")
+ _lines += [ "android_secondary_abi_toolchain=" +
+ rebase_path(_secondary_label_info, root_build_dir) ]
+ }
+ if (defined(build_apk_secondary_abi)) {
+ _lines += [ "build_apk_secondary_abi=$build_apk_secondary_abi" ]
+ }
+ write_file(android_build_vars, _lines)
+}
+
+python_library("devil_chromium_py") {
+ pydeps_file = "devil_chromium.pydeps"
+ data = [
+ "devil_chromium.py",
+ "devil_chromium.json",
+ "//third_party/catapult/third_party/gsutil/",
+ "//third_party/catapult/devil/devil/devil_dependencies.json",
+ ]
+}
+
+python_library("test_runner_py") {
+ pydeps_file = "test_runner.pydeps"
+ data = [
+ "pylib/gtest/filter/",
+ "pylib/instrumentation/render_test.html.jinja",
+ "test_wrapper/logdog_wrapper.py",
+ "${android_sdk_build_tools}/aapt",
+ "${android_sdk_build_tools}/dexdump",
+ "${android_sdk_build_tools}/lib64/libc++.so",
+ "${android_sdk_build_tools}/split-select",
+ "${android_sdk_root}/platform-tools/adb",
+ ]
+ data_deps = [
+ ":devil_chromium_py",
+ ]
+ if (is_asan) {
+ data_deps += [ "//tools/android/asan/third_party:asan_device_setup" ]
+ }
+
+ # Proguard is needed only when using apks (rather than native executables).
+ if (enable_java_templates) {
+ deps = [
+ "//third_party/proguard:proguard603_java",
+ ]
+ }
+}
+
+python_library("logdog_wrapper_py") {
+ pydeps_file = "test_wrapper/logdog_wrapper.pydeps"
+}
+
+python_library("resource_sizes_py") {
+ pydeps_file = "resource_sizes.pydeps"
+ data_deps = [
+ ":devil_chromium_py",
+ ]
+ data = [
+ android_build_vars,
+ android_readelf,
+ ]
+}
+
+# Create wrapper scripts in out/bin that takes care of setting the
+# --output-directory.
+_scripts_to_wrap = [
+ "asan_symbolize.py",
+ "tombstones.py",
+]
+
+_wrapper_targets = []
+foreach(script, _scripts_to_wrap) {
+ _target_name = get_path_info(script, "name") + "_wrapper"
+ _wrapper_targets += [ ":$_target_name" ]
+ wrapper_script(_target_name) {
+ target = script
+ }
+}
+
+group("wrapper_scripts") {
+ deps = _wrapper_targets
+}