Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions dev/builddeps-veloxbe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -260,18 +260,29 @@ function build_gluten_cpp {
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DENABLE_ENHANCED_FEATURES=$ENABLE_ENHANCED_FEATURES"

GLUTEN_CXX_FLAGS=""
if [ $OS == 'Darwin' ]; then
GLUTEN_CMAKE_OPTIONS+=" -DCMAKE_PREFIX_PATH=$INSTALL_PREFIX"
GLUTEN_CXX_FLAGS="-Wno-inconsistent-missing-override -Wno-macro-redefined"
if [[ "$INSTALL_PREFIX" != "/usr/local" && "$INSTALL_PREFIX" != /usr/local/* ]]; then
GLUTEN_CMAKE_OPTIONS+=" -DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON"
GLUTEN_CMAKE_OPTIONS+=" -DCMAKE_IGNORE_PREFIX_PATH=/usr/local"
GLUTEN_CMAKE_OPTIONS+=" -DCMAKE_IGNORE_PATH=/usr/local;/usr/local/include;/usr/local/lib;/usr/local/lib/cmake"
GLUTEN_CMAKE_OPTIONS+=" -DCMAKE_SYSTEM_IGNORE_PATH=/usr/local;/usr/local/include;/usr/local/lib;/usr/local/lib/cmake"
# CMAKE_NO_SYSTEM_FROM_IMPORTED demotes imported dependency includes from
# -isystem to -I, which exposes warnings in vendored dependency headers
# (e.g. abseil's __is_trivially_relocatable) and makes them fatal under
# -Werror on recent clang. Re-promote the trusted dependency prefix to a
# system include: a directory given as both -I and -isystem is treated as
# a system dir, so those warnings are suppressed again, while a leaked
# /usr/local path stays -I and guarded.
GLUTEN_CXX_FLAGS+=" -isystem ${INSTALL_PREFIX}/include"
fi
GLUTEN_CMAKE_OPTIONS+=" -DCMAKE_CXX_FLAGS=-Wno-inconsistent-missing-override -Wno-macro-redefined"
fi

cmake -G Ninja $GLUTEN_CMAKE_OPTIONS ..
# Pass CMAKE_CXX_FLAGS as a single quoted argument; GLUTEN_CMAKE_OPTIONS is
# word-split intentionally for its individual -D options.
cmake -G Ninja $GLUTEN_CMAKE_OPTIONS -DCMAKE_CXX_FLAGS="$GLUTEN_CXX_FLAGS" ..
ninja -j $NUM_THREADS
}

Expand Down
10 changes: 10 additions & 0 deletions ep/build-velox/src/build-velox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,16 @@ function compile {
-Wno-error=uninitialized -Wno-unknown-warning-option -Wno-deprecated-declarations'
if [[ "$(uname)" == "Darwin" ]]; then
CXX_FLAGS="$CXX_FLAGS -Wno-inconsistent-missing-override -Wno-macro-redefined"
if [[ "$INSTALL_PREFIX" != "/usr/local" && "$INSTALL_PREFIX" != /usr/local/* ]]; then
# CMAKE_NO_SYSTEM_FROM_IMPORTED below demotes all imported-target includes
# from -isystem to -I, which exposes warnings in vendored dependency headers
# (abseil's __is_trivially_relocatable, arrow's vendored date.h literal
# operators) and makes them fatal under -Werror on recent clang. Re-promote
# only the trusted dependency prefix: a directory given as both -I and
# -isystem is treated as a system dir, so those warnings are suppressed
# again, while a leaked /usr/local path stays -I and guarded.
CXX_FLAGS="$CXX_FLAGS -isystem ${INSTALL_PREFIX}/include"
fi
fi

COMPILE_OPTION="-DCMAKE_CXX_FLAGS=\"$CXX_FLAGS\" -DVELOX_ENABLE_PARQUET=ON -DVELOX_BUILD_TESTING=OFF \
Expand Down
Loading