From 33cf6f3bdca392af7dedab862d7b2b35669b965d Mon Sep 17 00:00:00 2001 From: Dhruba Borthakur Date: Tue, 13 Nov 2012 16:16:21 -0800 Subject: [PATCH] Make sse compilation optional. Summary: The fbcode compilation was always switching on msse by default. This patch keeps the same behaviour but allows the compilation process to switch off msse if needed. If one does not want to use sse, then do the following: export USE_SSE=0 make clean all Test Plan: make clean all Reviewers: heyongqiang Reviewed By: heyongqiang CC: leveldb Differential Revision: https://reviews.facebook.net/D6717 --- build_detect_platform | 2 +- fbcode.gcc471.sh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build_detect_platform b/build_detect_platform index 27cc75eb4..ede941506 100755 --- a/build_detect_platform +++ b/build_detect_platform @@ -128,7 +128,7 @@ if test "$USE_SCRIBE"; then DIRS="$DIRS scribe " fi -set -f # temporarily disable globbing so that our patterns aren't expanded +set -f # temporarily disable globbing so that our patterns arent expanded PRUNE_TEST="-name *test*.cc -prune" PRUNE_BENCH="-name *_bench.cc -prune" PORTABLE_FILES=`find $DIRS $PRUNE_TEST -o $PRUNE_BENCH -o -name '*.cc' -print | sort | tr "\n" " "` diff --git a/fbcode.gcc471.sh b/fbcode.gcc471.sh index b518fed00..77d9f7add 100644 --- a/fbcode.gcc471.sh +++ b/fbcode.gcc471.sh @@ -33,7 +33,9 @@ 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 " +if test -z "$USE_SSE"; then + export USE_SSE=" -msse -msse4.2 " +fi 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"