|
|
Created:
6 years, 7 months ago by Torne Modified:
6 years, 5 months ago CC:
chromium-reviews Base URL:
svn://svn.chromium.org/chrome/trunk/src Visibility:
Public. |
DescriptionFix building android webview on arm64 on mac.
Android uses gcc 4.8 for target on arm64, so -Wno-unused-local-typedefs
gets added to the gcc command line; unfortunately the host toolchain on
mac does not support this flag. We have no way to detect the host
toolchain version in the WebView build because we generate makefiles in
advance instead of on the build machine, so just hardcode an exception
until the instances of this warning can be fixed and this entire
conditional section removed.
BUG=321833
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=269766
Patch Set 1 #
Total comments: 2
Patch Set 2 : use cflags! instead of a negative condition #Messages
Total messages: 15 (0 generated)
Hi Nico, Lei, Can either of you think of a less gross way to do this? Most gcc versions ignore -W flags they don't understand, but mac host compilation in the android build system is stuck with Apple's ancient patched gcc 4.2 for the time being and it barfs. :/
On 2014/05/09 15:00:33, Torne wrote: > Hi Nico, Lei, > > Can either of you think of a less gross way to do this? Most gcc versions ignore > -W flags they don't understand, but mac host compilation in the android build > system is stuck with Apple's ancient patched gcc 4.2 for the time being and it > barfs. :/ "gcc" on Mac is actually just clang, and clang warns on unkown warning options. I have a patch floating on the clang mailing list to add -Wunused-local-typedefs, so just waiting long enough might be enough too (but there were some tricky review comments on my patch; also the patch would have to land, then make it into xcode, and then xcode would have to be deployed to everyone using this). I couldn't think of a better way than checking host_os either in https://codereview.chromium.org/118583003/ – I think we might want to teach gyp about host/target after all, like you suggested. (Then again, might not be worth it, with gn looming.) https://codereview.chromium.org/277983002/diff/1/build/common.gypi File build/common.gypi (right): https://codereview.chromium.org/277983002/diff/1/build/common.gypi#newcode5134 build/common.gypi:5134: ['gcc_version>=48 and (android_webview_build==0 or host_os!="mac")', { I'd revert this part… https://codereview.chromium.org/277983002/diff/1/build/common.gypi#newcode5141 build/common.gypi:5141: ['gcc_version>=48 and android_webview_build==1 and host_os=="mac"', { and instead do cflags! here and remove it again.
On 2014/05/09 15:30:39, Nico wrote: > On 2014/05/09 15:00:33, Torne wrote: > > Hi Nico, Lei, > > > > Can either of you think of a less gross way to do this? Most gcc versions > ignore > > -W flags they don't understand, but mac host compilation in the android build > > system is stuck with Apple's ancient patched gcc 4.2 for the time being and it > > barfs. :/ > > "gcc" on Mac is actually just clang, and clang warns on unkown warning options. > > I have a patch floating on the clang mailing list to add > -Wunused-local-typedefs, so just waiting long enough might be enough too (but > there were some tricky review comments on my patch; also the patch would have to > land, then make it into xcode, and then xcode would have to be deployed to > everyone using this). The Android build system unfortunately uses a hermetic host toolchain, not xcode, and the toolchain in question is currently Apple's old patched gcc 4.2, not clang. :( > I couldn't think of a better way than checking host_os either in > https://codereview.chromium.org/118583003/ – I think we might want to teach gyp > about host/target after all, like you suggested. (Then again, might not be worth > it, with gn looming.) Even if we did that I don't think it would help in this case: we generate the host_os=mac makefiles *on linux*, because running android gyp on mac doesn't work for an exciting variety of other reasons (and even if it did, the bot that generates the makefiles is a linux machine), and so it's impossible to actually detect the compiler/version that will be used on the mac :( :( > https://codereview.chromium.org/277983002/diff/1/build/common.gypi > File build/common.gypi (right): > > https://codereview.chromium.org/277983002/diff/1/build/common.gypi#newcode5134 > build/common.gypi:5134: ['gcc_version>=48 and (android_webview_build==0 or > host_os!="mac")', { > I'd revert this part… > > https://codereview.chromium.org/277983002/diff/1/build/common.gypi#newcode5141 > build/common.gypi:5141: ['gcc_version>=48 and android_webview_build==1 and > host_os=="mac"', { > and instead do cflags! here and remove it again. That's probably nicer, yeah, I'll change it.
On 2014/05/09 15:38:22, Torne wrote: > On 2014/05/09 15:30:39, Nico wrote: > > https://codereview.chromium.org/277983002/diff/1/build/common.gypi#newcode5134 > > build/common.gypi:5134: ['gcc_version>=48 and (android_webview_build==0 or > > host_os!="mac")', { > > I'd revert this part… > > > > https://codereview.chromium.org/277983002/diff/1/build/common.gypi#newcode5141 > > build/common.gypi:5141: ['gcc_version>=48 and android_webview_build==1 and > > host_os=="mac"', { > > and instead do cflags! here and remove it again. > > That's probably nicer, yeah, I'll change it. Done.
lgtm
The CQ bit was checked by torne@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/torne@chromium.org/277983002/20001
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are real, and report flakes to chrome-troopers@google.com. The failing builders are: android_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg/builds/18...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: android_dbg_triggered_tests on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered...)
The CQ bit was checked by torne@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/torne@chromium.org/277983002/20001
Message was sent while issue was closed.
Change committed as 269766
Message was sent while issue was closed.
On 2014/05/12 11:10:21, I haz the power (commit-bot) wrote: > Change committed as 269766 I'm getting cc1: warning: unrecognized command line option "-Wno-unused-local-typedefs" [enabled by default]. Is this expected?
Message was sent while issue was closed.
On 2014/07/09 18:15:27, aurimas wrote: > On 2014/05/12 11:10:21, I haz the power (commit-bot) wrote: > > Change committed as 269766 > > I'm getting cc1: warning: unrecognized command line option > "-Wno-unused-local-typedefs" [enabled by default]. Is this expected? Which compiler? (Likely unrelated to this CL though; this CL _removed_ that flag under certain conditions) |