summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authordpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-12 01:19:16 +0000
committerdpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-12 01:19:16 +0000
commit5a8d516b32101692d775ce18a5b8e2952308d241 (patch)
tree827738be60c176d95cb07722f6e68db0a3938bf5 /build
parenta403a3d5aead637939190b8361189877f14fc746 (diff)
downloadchromium_src-5a8d516b32101692d775ce18a5b8e2952308d241.zip
chromium_src-5a8d516b32101692d775ce18a5b8e2952308d241.tar.gz
chromium_src-5a8d516b32101692d775ce18a5b8e2952308d241.tar.bz2
Checkpoint work to get GN builds working on Android.
This fixes enough issues so that we can compile and link some libraries, but it is not yet a working build. Work remaining: - base needs JNI support ('base_jni_headers', etc.) - we need to figure out what should link and/or be APKs to run the tests - we need to adjust GN to only build in the host config, not the target config. R=brettw@chromium.org, cjhopman@chromium.org TBR=jam BUG=360936 Review URL: https://codereview.chromium.org/227673008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263440 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r--build/config/BUILDCONFIG.gn2
-rw-r--r--build/config/android/BUILD.gn20
2 files changed, 22 insertions, 0 deletions
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index 57a3486..2172df9 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -343,6 +343,8 @@ if (is_win) {
native_compiler_configs += [ "//build/config/mac:sdk", ]
} else if (is_ios) {
native_compiler_configs += [ "//build/config/ios:sdk", ]
+} else if (is_android) {
+ native_compiler_configs += [ "//build/config/android:sdk", ]
}
if (is_clang) {
native_compiler_configs += [ "//build/config/clang:find_bad_constructs" ]
diff --git a/build/config/android/BUILD.gn b/build/config/android/BUILD.gn
new file mode 100644
index 0000000..185db59
--- /dev/null
+++ b/build/config/android/BUILD.gn
@@ -0,0 +1,20 @@
+# 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/sysroot.gni")
+
+config("sdk") {
+ if (sysroot != "") {
+ cflags = [ "--sysroot=" + sysroot ]
+ ldflags = [ "--sysroot=" + sysroot ]
+
+ # Need to get some linker flags out of the sysroot.
+ sysroot_ld_path = rebase_path("//build/config/linux/sysroot_ld_path.py")
+ ldflags += [ exec_script(sysroot_ld_path,
+ [ rebase_path("//build/linux/sysroot_ld_path.sh"), sysroot ],
+ "value")
+ ]
+ }
+}