-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
makefiles-12.3.patch
65 lines (60 loc) · 1.88 KB
/
makefiles-12.3.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
diff --git a/src/Makefile b/src/Makefile
index bcdbd9588a..d453242675 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -17,19 +17,11 @@ SUBDIRS = \
port \
timezone \
backend \
- backend/utils/mb/conversion_procs \
- backend/snowball \
include \
interfaces \
- backend/replication/libpqwalreceiver \
- backend/replication/pgoutput \
fe_utils \
bin \
- pl \
- makefiles \
- test/regress \
- test/isolation \
- test/perl
+ makefiles
ifeq ($(with_llvm), yes)
SUBDIRS += backend/jit/llvm
diff --git a/src/backend/Makefile b/src/backend/Makefile
index b03d5e510f..d40ceff5c3 100644
--- a/src/backend/Makefile
+++ b/src/backend/Makefile
@@ -59,8 +59,11 @@ ifneq ($(PORTNAME), cygwin)
ifneq ($(PORTNAME), win32)
ifneq ($(PORTNAME), aix)
+EXPANDED_OBJS = $(call expand_subsys,$^)
+LL_OBJS = $(shell echo $(EXPANDED_OBJS) | sed -e 's/\.a/.ll/g')
postgres: $(OBJS)
$(CC) $(CFLAGS) $(call expand_subsys,$^) $(LDFLAGS) $(LDFLAGS_EX) $(export_dynamic) $(LIBS) -o $@
+ llvm-link -S -v $(LL_OBJS) -o postgres.ll
endif
endif
diff --git a/src/common/Makefile b/src/common/Makefile
index 2f22b9b101..f6e90a28f5 100644
--- a/src/common/Makefile
+++ b/src/common/Makefile
@@ -116,6 +116,7 @@ libpgcommon_shlib.a: $(OBJS_SHLIB)
libpgcommon_srv.a: $(OBJS_SRV)
rm -f $@
$(AR) $(AROPT) $@ $^
+ llvm-link -S -v $(OBJS_SRV) -o libpgcommon_srv.ll
# Because this uses its own compilation rule, it doesn't use the
# dependency tracking logic from Makefile.global. To make sure that
diff --git a/src/port/Makefile b/src/port/Makefile
index b9492b741f..3d64a7584b 100644
--- a/src/port/Makefile
+++ b/src/port/Makefile
@@ -102,6 +102,7 @@ libpgport_shlib.a: $(OBJS_SHLIB)
libpgport_srv.a: $(OBJS_SRV)
rm -f $@
$(AR) $(AROPT) $@ $^
+ llvm-link -S -v $(OBJS_SRV) -o libpgport_srv.ll
# Because this uses its own compilation rule, it doesn't use the
# dependency tracking logic from Makefile.global. To make sure that