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

Issue 199793014: Extend compiler_version.py to work with clang output. (Closed)

Created:
6 years, 9 months ago by mithro-old
Modified:
6 years, 6 months ago
Reviewers:
Lei Zhang, Nico
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

compiler_version.py now tries multiple different command lines. This is needed as clang needs either -no-integrated-as or -fno-integrated-as and gcc supports neither (Mac OS X linker/assembler also needs -v rather than --version). compiler_version.py now understands CXXFLAGS too. This means that if the linker/assembler used is changed by the environment value it will still be found (Such as when adding -B argument.) This will be helpful for using binutils from third_party. Also adding unittests for compiler_version.py tool. Checks a bunch of known version strings, more can be added as they are discovered. Could also help extending to Mac OS X in the future. BUG=352046

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+422 lines, -58 lines) Patch
M build/compiler_version.py View 2 chunks +109 lines, -58 lines 0 comments Download
A build/compiler_version_unittest.py View 1 chunk +313 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
mithro-old
Hi! This change is needed before I can reland https://codereview.chromium.org/199333007/. The tests in this change ...
6 years, 9 months ago (2014-03-24 05:36:26 UTC) #1
Nico
This script is getting pretty complicated pretty quickly. Is all this needed? We don't really ...
6 years, 9 months ago (2014-03-24 09:20:44 UTC) #2
mithro-old
On 2014/03/24 09:20:44, Nico (on GMT time Mar 15 - 24) wrote: > This script ...
6 years, 9 months ago (2014-03-24 09:51:42 UTC) #3
mithro-old
Friendly ping. Tim
6 years, 9 months ago (2014-03-26 02:15:53 UTC) #4
Nico
On 2014/03/24 09:51:42, mithro wrote: > On 2014/03/24 09:20:44, Nico (on GMT time Mar 15 ...
6 years, 9 months ago (2014-03-26 02:18:30 UTC) #5
mithro-old
> > At the moment we are just assuming that if you are using clang ...
6 years, 9 months ago (2014-03-26 02:29:07 UTC) #6
Nico
On Tue, Mar 25, 2014 at 7:29 PM, <mithro@mithis.com> wrote: > > At the moment ...
6 years, 9 months ago (2014-03-26 02:31:48 UTC) #7
mithro-old
> Right, but isn't it enough to run `as -v` for that? The "as" that ...
6 years, 9 months ago (2014-03-26 02:35:33 UTC) #8
Nico
6 years, 9 months ago (2014-03-26 02:38:00 UTC) #9
On 2014/03/26 02:35:33, mithro wrote:
> > Right, but isn't it enough to run `as -v` for that?
> 
> The "as" that gets run by clang is determined by search path which can be
> changed with flags and environment variables, for example -B argument. In fact
> we are just about to do that, telling clang to search in
> third_party/binutils/xxxx/bin

While true, this isn't really relevant to this CL as you're not passing -B to
the compiler either, right? Also, if we pass -B for as, we know binutils will be
new enough and don't need to call this script.

(…afk for a bit)

Powered by Google App Engine
This is Rietveld 408576698