Skip to content

Commit

Permalink
fix builds that use older clang versions (#248)
Browse files Browse the repository at this point in the history
pass PG_CPPFLAGS and PG_CXXFLAGS to both COMPILE.cxx.bc and
COMPILE.cc.bc

this fixes the build on ubuntu:22.04
  • Loading branch information
wuputah authored Oct 3, 2024
1 parent 28e74a0 commit 038b92a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,16 @@ override PG_CXXFLAGS += -std=c++17 -Wno-sign-compare -Wno-register ${DUCKDB_BUIL

SHLIB_LINK += -Wl,-rpath,$(PG_LIB)/ -lpq -Lthird_party/duckdb/build/$(DUCKDB_BUILD_TYPE)/src -L$(PG_LIB) -lduckdb -lstdc++ -llz4

COMPILE.cc.bc = $(CXX) -Wno-ignored-attributes -Wno-register $(BITCODE_CXXFLAGS) $(CXXFLAGS) $(PG_CPPFLAGS) $(PG_CXXFLAGS) -I$(INCLUDEDIR_SERVER) -emit-llvm -c

%.bc : %.cpp
$(COMPILE.cc.bc) $(SHLIB_LINK) -I$(INCLUDE_SERVER) -o $@ $<

include Makefile.global

# We need the DuckDB header files to build the .o files. We depend on the
# duckdb Makefile, because that target pulls in the submodule which includes
# those header files.
$(OBJS): third_party/duckdb/Makefile

COMPILE.cc.bc += $(PG_CPPFLAGS)
COMPILE.cxx.bc += $(PG_CXXFLAGS)

# shlib is the final output product - make duckdb and all .o dependencies
$(shlib): $(FULL_DUCKDB_LIB) $(OBJS)

Expand Down

0 comments on commit 038b92a

Please sign in to comment.