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

Unified Diff: tools/android_link.py

Issue 2364623002: Filter tcmalloc out of Android link (Closed)
Patch Set: Created 4 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android_link.py
diff --git a/tools/android_link.py b/tools/android_link.py
index 7854ce470bfbdcbcb7c174c934a8aea40af388b1..5de6d45a044bccc580c72e48e3d5d86853f6f7eb 100755
--- a/tools/android_link.py
+++ b/tools/android_link.py
@@ -132,9 +132,11 @@ def main():
crtend_android = os.path.join(android_ndk_lib, 'crtend_android.o')
if link_target == 'target':
+ # We meddle with the android link command line here because gyp does not
+ # allow configurations to modify link_settings, or set variables.
+
# Add and remove libraries as listed in configurations_android.gypi
- libs_to_rm = ['-lrt', '-lpthread', '-lnss3', '-lnssutil3', '-lsmime3',
- '-lplds4', '-lplc4', '-lnspr4',]
+ libs_to_rm = ['-lrt', '-lpthread',]
libs_to_add = ['-lstlport_static', android_libgcc, '-lc', '-ldl',
'-lstdc++', '-lm',]
@@ -142,9 +144,13 @@ def main():
if link_type == 'executable':
libs_to_add.extend(['-llog', '-lz', crtend_android])
+ # Filter out -l libs and add the right Android ones.
link_args = [i for i in link_args if i not in libs_to_rm]
link_args.extend(libs_to_add)
+ # Filter out tcmalloc.
+ link_args = [i for i in link_args if "tcmalloc" not in i]
+
link_args.insert(0, android_linker)
else:
link_args.extend(['-ldl', '-lrt'])
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698