Skip to content

Commit 561ed5c

Browse files
Implement clags for mac build
1 parent 2644245 commit 561ed5c

File tree

1 file changed

+4
-5
lines changed
  • src/postgres/third-party-extensions/pg_parquet

1 file changed

+4
-5
lines changed

src/postgres/third-party-extensions/pg_parquet/Makefile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
PG_CONFIG ?= pg_config
44
CARGO_BIN ?= $(shell command -v cargo || echo $(HOME)/.cargo/bin/cargo)
55
CARGO_DIR := $(dir $(CARGO_BIN))
6+
PG_PARQUET_CFLAGS := -Wno-error -Wno-implicit-fallthrough -Wno-unused-but-set-variable -Wno-missing-include-dirs
67

78
# YB: OS detection
89
UNAME_S := $(shell uname -s)
@@ -18,12 +19,11 @@ ifneq (,$(filter clang%,$(YB_COMPILER_TYPE)))
1819
CXX := $(YB_LLVM_TOOLCHAIN_DIR)/bin/clang++
1920
RUSTFLAGS := -C link-arg=-fuse-ld=lld -C linker=$(YB_LLVM_TOOLCHAIN_DIR)/bin/clang
2021
LIBCLANG_PATH := $(YB_LLVM_TOOLCHAIN_DIR)/lib
21-
CFLAGS := -Wno-error -Wno-implicit-fallthrough -Wno-unused-but-set-variable -Wno-missing-include-dirs
2222

2323
ifeq ($(UNAME_S),Darwin)
2424
RUSTFLAGS += -C link-arg=-isysroot -C link-arg=$(SDKROOT)
2525
RUSTFLAGS += -C link-arg=-Wl,-undefined,dynamic_lookup
26-
CFLAGS += -isysroot $(SDKROOT)
26+
PG_PARQUET_CFLAGS += -isysroot $(SDKROOT)
2727
else
2828
RUSTFLAGS += -L$(YB_THIRDPARTY_DIR)/installed/common/lib
2929
endif
@@ -41,7 +41,6 @@ else
4141
CXX := g++
4242
RUSTFLAGS := -L$(YB_THIRDPARTY_DIR)/installed/common/lib
4343
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
4544
endif
4645

4746
all:
@@ -59,7 +58,7 @@ cargo-pgrx-exists: cargo-exists
5958
$(if $(CXX),CXX=$(CXX),) \
6059
$(if $(RUSTFLAGS),RUSTFLAGS="$(RUSTFLAGS)",) \
6160
$(if $(LIBCLANG_PATH),LIBCLANG_PATH=$(LIBCLANG_PATH),) \
62-
$(if $(CFLAGS),CFLAGS="$(CFLAGS)",) \
61+
CFLAGS="$(PG_PARQUET_CFLAGS)" \
6362
CARGO_INCREMENTAL=1 \
6463
cargo build --package cargo-pgrx --release && \
6564
mkdir -p $$YB_BUILD_ROOT/.pgrx/data-15 && \
@@ -79,7 +78,7 @@ install: cargo-pgrx-exists
7978
$(if $(CXX),CXX=$(CXX),) \
8079
$(if $(RUSTFLAGS),RUSTFLAGS="$(RUSTFLAGS)",) \
8180
$(if $(LIBCLANG_PATH),LIBCLANG_PATH=$(LIBCLANG_PATH),) \
82-
$(if $(CFLAGS),CFLAGS="$(CFLAGS)",) \
81+
CFLAGS="$(PG_PARQUET_CFLAGS)" \
8382
LD_LIBRARY_PATH="$(YB_THIRDPARTY_DIR)/installed/common/lib:$$LD_LIBRARY_PATH" \
8483
PGRX_HOME=$(YB_BUILD_ROOT)/.pgrx \
8584
CARGO_INCREMENTAL=1 \

0 commit comments

Comments
 (0)