Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(805)

Side by Side Diff: build/toolchain/android/BUILD.gn

Issue 372813002: Fix solink and add a postsolink hook (use the hook for android strip) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-arm
Patch Set: Add comment for new arg Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | build/toolchain/gcc_toolchain.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/sysroot.gni") # Imports android/config.gni. 5 import("//build/config/sysroot.gni") # Imports android/config.gni.
6 import("//build/toolchain/clang.gni") 6 import("//build/toolchain/clang.gni")
7 import("//build/toolchain/goma.gni") 7 import("//build/toolchain/goma.gni")
8 import("//build/toolchain/gcc_toolchain.gni") 8 import("//build/toolchain/gcc_toolchain.gni")
9 9
10 # The Android GCC toolchains share most of the same parameters, so we have this 10 # The Android GCC toolchains share most of the same parameters, so we have this
(...skipping 30 matching lines...) Expand all
41 goma_prefix = "" 41 goma_prefix = ""
42 } 42 }
43 43
44 cc = goma_prefix + tool_prefix + "gcc" 44 cc = goma_prefix + tool_prefix + "gcc"
45 cxx = goma_prefix + tool_prefix + "g++" 45 cxx = goma_prefix + tool_prefix + "g++"
46 ar = tool_prefix + "ar" 46 ar = tool_prefix + "ar"
47 ld = cxx 47 ld = cxx
48 48
49 toolchain_os = "android" 49 toolchain_os = "android"
50 toolchain_cpu_arch = invoker.toolchain_cpu_arch 50 toolchain_cpu_arch = invoker.toolchain_cpu_arch
51
52 android_strip = "${tool_prefix}strip"
53 mkdir_command = "mkdir -p lib.stripped"
54 strip_command = "$android_strip --strip-unneeded -o lib.stripped/\$soname.tm p \$lib"
55 replace_command = "if ! cmp -s lib.stripped/\${soname}.tmp lib.stripped/\${s oname}; then mv lib.stripped/\${soname}.tmp lib.stripped/\${soname}; fi"
56 postsolink = "$mkdir_command && $strip_command && $replace_command"
51 } 57 }
52 } 58 }
53 59
54 android_gcc_toolchain("x86") { 60 android_gcc_toolchain("x86") {
55 android_ndk_sysroot = "$android_ndk_root/$x86_android_sysroot_subdir" 61 android_ndk_sysroot = "$android_ndk_root/$x86_android_sysroot_subdir"
56 android_ndk_lib_dir = "usr/lib" 62 android_ndk_lib_dir = "usr/lib"
57 63
58 tool_prefix = "$x86_android_toolchain_root/bin/i686-linux-android-" 64 tool_prefix = "$x86_android_toolchain_root/bin/i686-linux-android-"
59 toolchain_cpu_arch = "x86" 65 toolchain_cpu_arch = "x86"
60 } 66 }
61 67
62 android_gcc_toolchain("arm") { 68 android_gcc_toolchain("arm") {
63 android_ndk_sysroot = "$android_ndk_root/$arm_android_sysroot_subdir" 69 android_ndk_sysroot = "$android_ndk_root/$arm_android_sysroot_subdir"
64 android_ndk_lib_dir = "usr/lib" 70 android_ndk_lib_dir = "usr/lib"
65 71
66 tool_prefix = "$arm_android_toolchain_root/bin/arm-linux-androideabi-" 72 tool_prefix = "$arm_android_toolchain_root/bin/arm-linux-androideabi-"
67 toolchain_cpu_arch = "arm" 73 toolchain_cpu_arch = "arm"
68 } 74 }
69 75
70 android_gcc_toolchain("mipsel") { 76 android_gcc_toolchain("mipsel") {
71 android_ndk_sysroot = "$android_ndk_root/$mips_android_sysroot_subdir" 77 android_ndk_sysroot = "$android_ndk_root/$mips_android_sysroot_subdir"
72 android_ndk_lib_dir = "usr/lib" 78 android_ndk_lib_dir = "usr/lib"
73 79
74 tool_prefix = "$mips_android_toolchain_root/bin/mipsel-linux-android-" 80 tool_prefix = "$mips_android_toolchain_root/bin/mipsel-linux-android-"
75 toolchain_cpu_arch = "mipsel" 81 toolchain_cpu_arch = "mipsel"
76 } 82 }
OLDNEW
« no previous file with comments | « no previous file | build/toolchain/gcc_toolchain.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698