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

Issue 6581032: Prevent compiling cpu_unittest on i386 (Take 2).... (Closed)

Created:
9 years, 10 months ago by Hironori Bono
Modified:
9 years, 7 months ago
Reviewers:
jiesun
CC:
chromium-reviews, brettw-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Prevent compiling cpu_unittest on i386 (Take 2). This change prevents compiling cpu_unittest on 32-bit GCC since some builders does not compile with SSE support. TBR=jiesun BUG=none TEST=fix build. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=75872

Patch Set 1 #

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M base/cpu_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
Hironori Bono
9 years, 10 months ago (2011-02-24 10:51:01 UTC) #1
jiesun
LGTM. do you happened to know the reason why sse support is disabled on those ...
9 years, 10 months ago (2011-02-24 17:22:58 UTC) #2
Hironori Bono
Greetings, Thank you for your review. To read "src/build/common.gypi" deeply, it seems SSE2 is disabled ...
9 years, 10 months ago (2011-02-25 04:50:42 UTC) #3
jiesun
9 years, 10 months ago (2011-02-25 19:02:50 UTC) #4
from gcc help : "For the i386 compiler, you need to use -march=cpu-type,
-msse or -msse2 switches to enable SSE extensions and make this option
effective.
               For the x86-64 compiler, these extensions are enabled by
default."
so for 64 bits, it could compile always.
for 32 bits, only when chromium or chromeos case, it could compile.
I think for window always accept intrinsics.
evannier@ suggest me to use #if defined __SSE2___ to detect if -msse2 is
passed. http://codereview.chromium.org/6334070/
I thought it maybe cleaner to use this rather than detect chromium and
chrome-os case... otherwise changing gypi file will need to change all the
other places in the code base.
but I had not tried myself.

On Thu, Feb 24, 2011 at 8:50 PM, <hbono@chromium.org> wrote:

> Greetings,
>
> Thank you for your review. To read "src/build/common.gypi" deeply, it seems
> SSE2
> is disabled only when building Google Chrome on Linux i386 as listed in the
> following snippet. So, I should have used GOOGLE_CHROME_BUILD instead of
> __x86_64__. (I will create another change to replace it.)
>
>  ['branding=="Chromium" and disable_sse2==0', {
>    'cflags': [
>      '-march=pentium4',
>      '-msse2',
>      '-mfpmath=sse',
>      ],
>    }],
>  ...(snip)...
>  ['chromeos==1 and disable_sse2==0', {
>    'cflags': [
>      '-msse2',
>    ],
>  }],
>
> Regards,
>
> Hironori Bono
>
>
> http://codereview.chromium.org/6581032/
>

Powered by Google App Engine
This is Rietveld 408576698