3
3
PG_CONFIG ?= pg_config
4
4
CARGO_BIN ?= $(shell command -v cargo || echo $(HOME ) /.cargo/bin/cargo)
5
5
CARGO_DIR := $(dir $(CARGO_BIN ) )
6
+ PG_PARQUET_CFLAGS := -Wno-error -Wno-implicit-fallthrough -Wno-unused-but-set-variable -Wno-missing-include-dirs
6
7
7
8
# YB: OS detection
8
9
UNAME_S := $(shell uname -s)
@@ -18,12 +19,11 @@ ifneq (,$(filter clang%,$(YB_COMPILER_TYPE)))
18
19
CXX := $(YB_LLVM_TOOLCHAIN_DIR)/bin/clang++
19
20
RUSTFLAGS := -C link-arg=-fuse-ld=lld -C linker=$(YB_LLVM_TOOLCHAIN_DIR)/bin/clang
20
21
LIBCLANG_PATH := $(YB_LLVM_TOOLCHAIN_DIR)/lib
21
- CFLAGS := -Wno-error -Wno-implicit-fallthrough -Wno-unused-but-set-variable -Wno-missing-include-dirs
22
22
23
23
ifeq ($(UNAME_S),Darwin)
24
24
RUSTFLAGS += -C link-arg=-isysroot -C link-arg=$(SDKROOT)
25
25
RUSTFLAGS += -C link-arg=-Wl,-undefined,dynamic_lookup
26
- CFLAGS += -isysroot $(SDKROOT)
26
+ PG_PARQUET_CFLAGS += -isysroot $(SDKROOT)
27
27
else
28
28
RUSTFLAGS += -L$(YB_THIRDPARTY_DIR)/installed/common/lib
29
29
endif
41
41
CXX := g++
42
42
RUSTFLAGS := -L$(YB_THIRDPARTY_DIR)/installed/common/lib
43
43
LIBCLANG_PATH := $(if $(YB_LLVM_TOOLCHAIN_DIR),$(YB_LLVM_TOOLCHAIN_DIR)/lib)
44
- CFLAGS := -Wno-error -Wno-implicit-fallthrough -Wno-unused-but-set-variable -Wno-missing-include-dirs
45
44
endif
46
45
47
46
all :
@@ -59,7 +58,7 @@ cargo-pgrx-exists: cargo-exists
59
58
$(if $(CXX ) ,CXX=$(CXX ) ,) \
60
59
$(if $(RUSTFLAGS ) ,RUSTFLAGS="$(RUSTFLAGS ) ",) \
61
60
$(if $(LIBCLANG_PATH ) ,LIBCLANG_PATH=$(LIBCLANG_PATH ) ,) \
62
- $( if $( CFLAGS ) ,CFLAGS ="$(CFLAGS ) ",) \
61
+ CFLAGS=" $( PG_PARQUET_CFLAGS ) " \
63
62
CARGO_INCREMENTAL=1 \
64
63
cargo build --package cargo-pgrx --release && \
65
64
mkdir -p $$ YB_BUILD_ROOT/.pgrx/data-15 && \
@@ -79,7 +78,7 @@ install: cargo-pgrx-exists
79
78
$(if $(CXX ) ,CXX=$(CXX ) ,) \
80
79
$(if $(RUSTFLAGS ) ,RUSTFLAGS="$(RUSTFLAGS ) ",) \
81
80
$(if $(LIBCLANG_PATH ) ,LIBCLANG_PATH=$(LIBCLANG_PATH ) ,) \
82
- $( if $( CFLAGS ) ,CFLAGS ="$(CFLAGS ) ",) \
81
+ CFLAGS=" $( PG_PARQUET_CFLAGS ) " \
83
82
LD_LIBRARY_PATH=" $( YB_THIRDPARTY_DIR) /installed/common/lib:$$ LD_LIBRARY_PATH" \
84
83
PGRX_HOME=$(YB_BUILD_ROOT ) /.pgrx \
85
84
CARGO_INCREMENTAL=1 \
0 commit comments