New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 747675 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 767901
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug

Blocked on:
issue 749784

Blocking:
issue 747676



Sign in to add a comment

Consider using "our" libc++ on Android too

Project Member Reported by thakis@chromium.org, Jul 22 2017

Issue description

We recently switched chrome/linux to libc++. We basically DEPS in a fixed revision from upstream libc++ and compile it as part of the chrome build. This makes it very easy to update libc++.

On Android, we currently use libc++ from the NDK. If possible, I think it'd be nice if we could use the mechanism we use on Linux on Android too. That way, they'd both be on the same libc++ revision, perf would be very comparable, and updating libc++ becomes easier on Android too.
 

Comment 1 by thakis@chromium.org, Jul 22 2017

Blocking: 747676

Comment 2 by pasko@chromium.org, Jul 24 2017

Cc: ajwong@chromium.org
Sounds like pure win. We are currently patching on top of the NDK, which makes it messy to update our snapshot of the NDK.

I don't see any obvious drawbacks with building against our own libc++ (like: a libc++ update would require an NDK update for some hypothetical obscure reason), +ajwong@ in case he knows if it might surprise us.

In the department of comparable perf I expect no improvement: memory allocator is still different, CPU pipelines are different, disk characteristics have nothing in common.

Comment 3 by ajwong@chromium.org, Jul 24 2017

thakis knows more than I do about this now, but I will confirm that I also can't see a reason this won't work.

The main thing we want to be sure we do is match up any of the compilerrt or lower level runtimes that are below the c++ standard library layers...but I expect that shouldn't be hard so we did a lot of work a few years ago to make that all consistent.
Cc: thakis@chromium.org
Owner: thomasanderson@chromium.org
Status: Started (was: Untriaged)
I'll take a look at this and see what is required
With a few changes, I was able to do a release build of chrome_public_apk.  However, a few targets in 'all' fail because of multiply defined symbols coming from libc++_static.a.  And on a component_build, something is stripping too many symbols from lib.unstripped/libc++.cr.so, causing undefined symbol references.
Blockedon: 749784
Status: Assigned (was: Started)
Status: Started (was: Assigned)
Starting on this again.  I was recently able to get all targets to build on android debug and release builds.
Project Member

Comment 10 by bugdroid1@chromium.org, Nov 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/buildtools/+/df36429e1847e38fda6a7413ba1aa2cbafbc4a34

commit df36429e1847e38fda6a7413ba1aa2cbafbc4a34
Author: Tom Anderson <thomasanderson@chromium.org>
Date: Wed Nov 01 23:15:19 2017

Add vector.cpp to libc++ sources

vector.cpp was added recently, and without adding it to sources,
linking libc++.so will fail.

BUG= 747675 
R=hans@chromium.org

Change-Id: I8580d1438214baba4500c7f9639d6f0c57787b46

[modify] https://crrev.com/df36429e1847e38fda6a7413ba1aa2cbafbc4a34/third_party/libc++/BUILD.gn

Project Member

Comment 11 by bugdroid1@chromium.org, Nov 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/69f1dd00a0df187dcea7c2099eb4b59800810477

commit 69f1dd00a0df187dcea7c2099eb4b59800810477
Author: Tom Anderson <thomasanderson@chromium.org>
Date: Thu Nov 02 02:48:38 2017

Roll buildtools to df36429

There are 2 revisions in this roll:
https://chromium.googlesource.com/chromium/buildtools/+/df36429e1847e38fda6a7413ba1aa2cbafbc4a34
https://chromium.googlesource.com/chromium/buildtools/+/011c39ca57fa6b24c94e597b104d7238b1c41e24

This is necessary for Android in-tree libc++ builds.

BUG= 747675 
TBR=dpranke@chromium.org

Change-Id: I07970d837bd95fdd9ab9e16f9c5eeef8dadeac3f
Reviewed-on: https://chromium-review.googlesource.com/750046
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513386}
[modify] https://crrev.com/69f1dd00a0df187dcea7c2099eb4b59800810477/DEPS

Project Member

Comment 12 by bugdroid1@chromium.org, Nov 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/buildtools/+/817a502753ff654f5028570a5f61ea06aa03306f

commit 817a502753ff654f5028570a5f61ea06aa03306f
Author: Tom Anderson <thomasanderson@chromium.org>
Date: Fri Nov 03 18:21:32 2017

Prepare Android for building libc++ in-tree

BUG= 747675 
R=hans@chromium.org

Change-Id: I20ce180355b5ef17e8127bac67f3219e413b7e0a

[modify] https://crrev.com/817a502753ff654f5028570a5f61ea06aa03306f/third_party/libc++/BUILD.gn
[modify] https://crrev.com/817a502753ff654f5028570a5f61ea06aa03306f/third_party/libc++abi/BUILD.gn

Project Member

Comment 13 by bugdroid1@chromium.org, Nov 4 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/buildtools/+/05f9bc9b85996610289a69bc4628cc4532bed836

commit 05f9bc9b85996610289a69bc4628cc4532bed836
Author: Tom Anderson <thomasanderson@chromium.org>
Date: Fri Nov 03 23:59:04 2017

Fix undefined deps on arm64

BUG= 747675 
TBR=hans@chromium.org

Change-Id: Idcf597e3898e9259fb8024fa0d1456c8af8b3ecf

[modify] https://crrev.com/05f9bc9b85996610289a69bc4628cc4532bed836/third_party/libc++abi/BUILD.gn

Mergedinto: 767901
Status: Duplicate (was: Started)
Project Member

Comment 15 by bugdroid1@chromium.org, May 21 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f182ac73377d9af149df8ec8c1e5f9812f986366

commit f182ac73377d9af149df8ec8c1e5f9812f986366
Author: Tom Anderson <thomasanderson@chromium.org>
Date: Mon May 21 19:53:39 2018

Android: Allow building with use_custom_libcxx=true

BUG= 747675 
R=thakis
TBR=dpranke

Change-Id: I8d3cdab732a10d81480f6476fbdccff2c8ef34e5
Reviewed-on: https://chromium-review.googlesource.com/754033
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560338}
[modify] https://crrev.com/f182ac73377d9af149df8ec8c1e5f9812f986366/android_webview/BUILD.gn
[modify] https://crrev.com/f182ac73377d9af149df8ec8c1e5f9812f986366/android_webview/test/BUILD.gn
[modify] https://crrev.com/f182ac73377d9af149df8ec8c1e5f9812f986366/base/android/jni_generator/BUILD.gn
[modify] https://crrev.com/f182ac73377d9af149df8ec8c1e5f9812f986366/build/config/android/BUILD.gn
[modify] https://crrev.com/f182ac73377d9af149df8ec8c1e5f9812f986366/build/config/android/internal_rules.gni
[modify] https://crrev.com/f182ac73377d9af149df8ec8c1e5f9812f986366/build/config/compiler/BUILD.gn
[modify] https://crrev.com/f182ac73377d9af149df8ec8c1e5f9812f986366/build/config/posix/BUILD.gn
[modify] https://crrev.com/f182ac73377d9af149df8ec8c1e5f9812f986366/chrome/android/BUILD.gn
[modify] https://crrev.com/f182ac73377d9af149df8ec8c1e5f9812f986366/remoting/client/jni/BUILD.gn
[modify] https://crrev.com/f182ac73377d9af149df8ec8c1e5f9812f986366/testing/test.gni
[modify] https://crrev.com/f182ac73377d9af149df8ec8c1e5f9812f986366/third_party/android_crazy_linker/BUILD.gn
[modify] https://crrev.com/f182ac73377d9af149df8ec8c1e5f9812f986366/tools/android/memdump/BUILD.gn

Sign in to add a comment