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

Unified 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: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/toolchain/gcc_toolchain.gni » ('j') | build/toolchain/gcc_toolchain.gni » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain/android/BUILD.gn
diff --git a/build/toolchain/android/BUILD.gn b/build/toolchain/android/BUILD.gn
index dc3bfeddab776e9bdfe9da5358d7e68599319f4b..0355a8c6b21dc77c048cbc9f466468709465e767 100644
--- a/build/toolchain/android/BUILD.gn
+++ b/build/toolchain/android/BUILD.gn
@@ -39,6 +39,12 @@ template("android_gcc_toolchain") {
toolchain_os = "android"
toolchain_cpu_arch = invoker.toolchain_cpu_arch
+
+ android_strip = "${tool_prefix}strip"
+ mkdir_command = "mkdir -p lib.stripped"
cjhopman 2014/07/07 23:00:50 This mkdir isn't needed if ninja knows about the o
brettw 2014/07/08 22:06:54 Can you add a comment above this line about why it
Nico 2014/07/08 23:02:29 Can we not use mkdir? It's not available on Window
cjhopman 2014/07/11 20:48:50 The right way to do this is to tell ninja about th
+ strip_command = "$android_strip --strip-unneeded -o lib.stripped/\$soname.tmp \$lib"
+ replace_command = "if ! cmp -s lib.stripped/\${soname}.tmp lib.stripped/\${soname}; then mv lib.stripped/\${soname}.tmp lib.stripped/\${soname}; fi"
+ postsolink = "$mkdir_command && $strip_command && $replace_command"
}
}
« no previous file with comments | « no previous file | build/toolchain/gcc_toolchain.gni » ('j') | build/toolchain/gcc_toolchain.gni » ('J')

Powered by Google App Engine
This is Rietveld 408576698