Skip to content

Commit 20882d9

Browse files
mngr777sergei sh
andauthored
Enable link time optimization (#75)
Co-authored-by: sergei sh <sshoulbakov@kontur.io>
1 parent 9edceda commit 20882d9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ EXTRA_CLEAN += \
6464

6565
# PGXS boilerplate
6666
PG_CONFIG = pg_config
67+
CUSTOM_COPT=-flto -mpc64
6768
PGXS := $(shell $(PG_CONFIG) --pgxs)
6869
include $(PGXS)
6970

@@ -81,7 +82,7 @@ $(LIBH3_BUILD): $(LIBH3_SOURCE)
8182
mkdir -p $(LIBH3_BUILD)
8283
cd $(LIBH3_BUILD) && cmake \
8384
-DCMAKE_BUILD_TYPE=Release \
84-
-DCMAKE_C_FLAGS=-fPIC \
85+
-DCMAKE_C_FLAGS="-fPIC -fvisibility=hidden -flto -fwrapv -mpc64" \
8586
-DBUILD_TESTING=OFF \
8687
-DENABLE_COVERAGE=OFF \
8788
-DENABLE_DOCS=OFF \

0 commit comments

Comments
 (0)