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

Side by Side Diff: build/SConscript.main

Issue 42188: Linux: Use -mfpmath=sse to remove differences between opt and debug (Closed)
Patch Set: Created 11 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 import shutil 6 import shutil
7 import sys 7 import sys
8 8
9 9
10 if sys.platform == 'win32': 10 if sys.platform == 'win32':
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 '-Wno-deprecated', # Needed for using ext/hash_map on GCC 4.3 468 '-Wno-deprecated', # Needed for using ext/hash_map on GCC 4.3
469 ] 469 ]
470 if not root_env.get('_GYP'): 470 if not root_env.get('_GYP'):
471 linux_env.Append( 471 linux_env.Append(
472 BUILD_SCONSCRIPTS = [ 472 BUILD_SCONSCRIPTS = [
473 '$LIBEVENT_DIR/libevent${_GYP}.scons', 473 '$LIBEVENT_DIR/libevent${_GYP}.scons',
474 ], 474 ],
475 ) 475 )
476 linux_env.Append( 476 linux_env.Append(
477 ASFLAGS = ['-32'], 477 ASFLAGS = ['-32'],
478 CCFLAGS = ['-m32', '-pthread', '-march=i686', '-fno-exceptions'], 478 CCFLAGS = ['-m32', '-pthread', '-march=pentium4', '-fno-exceptions',
479 # All floating-point computations on x87 happens in 80-bit precision.
480 # Because the C and C++ language standards allow the compiler to keep the
481 # floating-point values in higher precision than what's specified in the
482 # source and doing so is more efficient than constantly rounding up to
483 # 64-bit or 32-bit precision as specified in the source, the compiler,
484 # especially in the optimized mode, tries very hard to keep values in x87
485 # floating-point stack (in 80-bit precision) as long as possible. This has
486 # important side effects, that the real value used in computation may
487 # change depending on how the compiler did the optimization - that is, the
488 # value kept in 80-bit is different than the value rounded down to 64-bit
489 # or 32-bit. There are possible compiler options to make this behavior
490 # consistent (e.g. -ffloat-store would keep all floating-values in the
491 # memory, thus force them to be rounded to its original precision) but they
492 # have significant runtime performance penalty.
493 #
494 # -mfpmath=sse -msse2 makes the compiler use SSE instructions which keep
495 # floating-point values in SSE registers in its native precision (32-bit
496 # for single precision, and 64-bit for double precision values). This means
497 # the floating-point value used during computation does not change
498 # depending on how the compiler optimized the code, since the value is
499 # always kept in its specified precision.
500 '-msse2', '-mfpmath=sse'],
479 # GCC will generate ident directives with the GCC version. Accumulate 501 # GCC will generate ident directives with the GCC version. Accumulate
480 # these all up and you end up with ~80K repeated in a .comment section. 502 # these all up and you end up with ~80K repeated in a .comment section.
481 CCFLAGS_OPTIMIZED = ['-fno-ident'], 503 CCFLAGS_OPTIMIZED = ['-fno-ident'],
482 CXXFLAGS = ['-Wall', '-Werror', '-march=i686'] + excluded_warnings, 504 CXXFLAGS = ['-Wall', '-Werror', '-march=i686'] + excluded_warnings,
483 LINKFLAGS = ['-m32', '-pthread'], 505 LINKFLAGS = ['-m32', '-pthread'],
484 ) 506 )
485 507
486 linux_env.Replace( 508 linux_env.Replace(
487 # Linking of large files uses lots of RAM, so serialize links 509 # Linking of large files uses lots of RAM, so serialize links
488 # using the handy flock command from util-linux. 510 # using the handy flock command from util-linux.
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 'all_libraries', 881 'all_libraries',
860 'all_languages', 882 'all_languages',
861 'all_programs', 883 'all_programs',
862 'all_test_programs', 884 'all_test_programs',
863 ], projects = [p], 885 ], projects = [p],
864 COMPONENT_VS_PROJECT_SCRIPT_PATH=( 886 COMPONENT_VS_PROJECT_SCRIPT_PATH=(
865 'cd $$(ProjectDir)/$VS_PROJECT_TO_MAIN_DIR && hammer.bat'), 887 'cd $$(ProjectDir)/$VS_PROJECT_TO_MAIN_DIR && hammer.bat'),
866 ) 888 )
867 889
868 # ------------------------------------------------------------------------- 890 # -------------------------------------------------------------------------
OLDNEW
« 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