Skip to content

Commit d200813

Browse files
nbyavuzhackorum
authored andcommitted
meson: Add LLVM bitcode emissions for contrib libraries
The libraries for which bitcode files are generated are selected manually. Bitcode is only worthwhile for extensions that provide lightweight SQL operators/functions that can benefit from being inlined into JIT-compiled expressions, so this is restricted to citext, hstore, intarray, ltree and pg_trgm. Author: Andres Freund <andres@anarazel.de> Author: Nazir Bilal Yavuz <byavuz81@gmail.com> Author: Diego Fronza <diego.fronza@percona.com> Reviewed-by: Peter Eisentraut <peter@eisentraut.org> Reviewed-by: Diego Fronza <diego.fronza@percona.com> Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com> Discussion: https://postgr.es/m/206b001d-1884-4081-bd02-bed5c92f02ba%40eisentraut.org
1 parent c68f4dd commit d200813

5 files changed

Lines changed: 29 additions & 0 deletions

File tree

contrib/citext/meson.build

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ install_data(
3030
kwargs: contrib_data_args,
3131
)
3232

33+
bitcode_modules += {
34+
'target': citext,
35+
'srcfiles': citext_sources,
36+
}
37+
3338
tests += {
3439
'name': 'citext',
3540
'sd': meson.current_source_dir(),

contrib/hstore/meson.build

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ install_headers(
4343
install_dir: dir_include_extension / 'hstore',
4444
)
4545

46+
bitcode_modules += {
47+
'target': hstore,
48+
'srcfiles': hstore_sources,
49+
}
50+
4651
tests += {
4752
'name': 'hstore',
4853
'sd': meson.current_source_dir(),

contrib/intarray/meson.build

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ install_data(
3333
kwargs: contrib_data_args,
3434
)
3535

36+
bitcode_modules += {
37+
'target': intarray,
38+
'srcfiles': intarray_sources,
39+
}
40+
3641
tests += {
3742
'name': 'intarray',
3843
'sd': meson.current_source_dir(),

contrib/ltree/meson.build

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ install_headers(
4141
install_dir: dir_include_extension / 'ltree',
4242
)
4343

44+
ltree_dir = meson.current_source_dir()
45+
bitcode_modules += {
46+
'target': ltree,
47+
'srcfiles': ltree_sources,
48+
'additional_flags': [
49+
'-I@0@'.format(ltree_dir)
50+
]
51+
}
52+
4453
tests += {
4554
'name': 'ltree',
4655
'sd': meson.current_source_dir(),

contrib/pg_trgm/meson.build

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ install_data(
3232
kwargs: contrib_data_args,
3333
)
3434

35+
bitcode_modules += {
36+
'target': pg_trgm,
37+
'srcfiles': pg_trgm_sources,
38+
}
39+
3540
tests += {
3641
'name': 'pg_trgm',
3742
'sd': meson.current_source_dir(),

0 commit comments

Comments
 (0)