From 80fd916d1a3fdb447b7e7c4c0358ae7f5d0f3838 Mon Sep 17 00:00:00 2001 From: sdong Date: Thu, 31 Oct 2019 13:56:50 -0700 Subject: [PATCH] Revert "[FB Internal] Remove code for FB-only toolchain (since GCC 4.8 is everywhere already)" This reverts commit 61720850f631d1c430c92ffd8e498e8374a4b548. --- build_tools/build_detect_platform | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/build_tools/build_detect_platform b/build_tools/build_detect_platform index e4bf4c592..55c107dc8 100755 --- a/build_tools/build_detect_platform +++ b/build_tools/build_detect_platform @@ -46,6 +46,19 @@ PLATFORM_CXXFLAGS="-std=c++11" # we currently depend on POSIX platform COMMON_FLAGS="-DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX" +# Default to fbcode gcc on internal fb machines +if [ -z "$ROCKSDB_NO_FBCODE" -a -d /mnt/gvfs/third-party ]; then + FBCODE_BUILD="true" + # If we're compiling with TSAN we need pic build + PIC_BUILD=$COMPILE_WITH_TSAN + if [ -z "$ROCKSDB_FBCODE_BUILD_WITH_481" ]; then + source "$PWD/build_tools/fbcode_config.sh" + else + # we need this to build with MySQL. Don't use for other purposes. + source "$PWD/build_tools/fbcode_config4.8.1.sh" + fi +fi + # Delete existing output, if it exists rm -f "$OUTPUT" touch "$OUTPUT"