Skip to content

Commit

Permalink
Enable SSE when building with fbcode support.
Browse files Browse the repository at this point in the history
Summary:
fbcode build now support SSE instructions.
Delete older version of the compile-helper fbcode.sh. This is
subsumed by fbcode.gcc471.sh.

Test Plan: run make check

Reviewers: heyongqiang, MarkCallaghan

Reviewed By: heyongqiang

Differential Revision: https://reviews.facebook.net/D6057
  • Loading branch information
dhruba committed Oct 18, 2012
1 parent aa73538 commit cd93e82
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 47 deletions.
2 changes: 1 addition & 1 deletion README.fb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

* Compiling for CPUs with SSE4 support

make OPT='-O2 -DNDEBUG -D__SSE4_2__'
make OPT='-O2 -DNDEBUG -msse -msse4.2'

This makes CRC computation much faster, but
binaries won't run on CPUs that don't support it.
Expand Down
3 changes: 3 additions & 0 deletions build_detect_platform
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@ if test "$USE_THRIFT" || test "$USE_SCRIBE" ; then
PLATFORM_LDFLAGS+=$THRIFT_LDFLAGS
fi

# if Intel SSE instruction set is supported, set USE_SSE=" -msse -msse4.2 "
COMMON_FLAGS+=$USE_SSE

PLATFORM_CCFLAGS="$PLATFORM_CCFLAGS $COMMON_FLAGS"
PLATFORM_CXXFLAGS="$PLATFORM_CXXFLAGS $COMMON_FLAGS"

Expand Down
3 changes: 3 additions & 0 deletions fbcode.gcc471.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ THRIFT_INCLUDE=" -I $TOOLCHAIN_LIB_BASE/boost/boost-1.48.0/bef9365/include -std=
THRIFT_INCLUDE+=" -I./thrift -I./thrift/gen-cpp -I./thrift/lib/cpp"
THRIFT_LIBS=" -L $TOOLCHAIN_LIB_BASE/boost/boost-1.48.0/bef9365/lib"

# use Intel SSE support for checksum calculations
export USE_SSE=" -msse -msse4.2 "

CC="$TOOLCHAIN_EXECUTABLES/gcc/gcc-4.7.1-glibc-2.14.1/bin/gcc"
CXX="$TOOLCHAIN_EXECUTABLES/gcc/gcc-4.7.1-glibc-2.14.1/bin/g++ $JINCLUDE $SNAPPY_INCLUDE $THRIFT_INCLUDE"
AR=$TOOLCHAIN_EXECUTABLES/binutils/binutils-2.21.1/da39a3e/bin/ar
Expand Down
46 changes: 0 additions & 46 deletions fbcode.sh

This file was deleted.

0 comments on commit cd93e82

Please sign in to comment.