Testing v15 with LLVM enabled on Windows, I hit a configure failure:
citext, hstore, intarray, ltree and pg_trgm include Windows resource
objects in their bitcode source lists, which fs.parent() rejects.
The attached patch saves each C-source list before adding resources.
DLL resources remain intact, and all 27 C files remain in bitcode
generation.
A focused configure test fails before the change and passes afterward.
With my local header/export supplement also applied, fresh LLVM
configuration and all 27 bitcode files plus five ThinLTO indexes build
successfully using MinGW x64 on an ARM64 host. Full-server JIT SQL
remains untested.
Let me know if you'd prefer another approach to separating the resource inputs.
Best,
Harrison
diff --git a/contrib/citext/meson.build b/contrib/citext/meson.build
--- a/contrib/citext/meson.build
+++ b/contrib/citext/meson.build
@@ -3,6 +3,8 @@
citext_sources = files(
'citext.c',
)
+
+citext_bitcode_sources = citext_sources
if host_system == 'windows'
citext_sources += rc_lib_gen.process(win32ver_rc, extra_args: [
@@ -32,7 +34,7 @@
bitcode_modules += {
'target': citext,
- 'srcfiles': citext_sources,
+ 'srcfiles': citext_bitcode_sources,
}
tests += {
diff --git a/contrib/hstore/meson.build b/contrib/hstore/meson.build
--- a/contrib/hstore/meson.build
+++ b/contrib/hstore/meson.build
@@ -11,6 +11,8 @@
'hstore_op.c',
'hstore_subs.c',
)
+
+hstore_bitcode_sources = hstore_sources
if host_system == 'windows'
hstore_sources += rc_lib_gen.process(win32ver_rc, extra_args: [
@@ -45,7 +47,7 @@
bitcode_modules += {
'target': hstore,
- 'srcfiles': hstore_sources,
+ 'srcfiles': hstore_bitcode_sources,
}
tests += {
diff --git a/contrib/intarray/meson.build b/contrib/intarray/meson.build
--- a/contrib/intarray/meson.build
+++ b/contrib/intarray/meson.build
@@ -9,6 +9,8 @@
'_int_tool.c',
'_intbig_gist.c',
)
+
+intarray_bitcode_sources = intarray_sources
if host_system == 'windows'
intarray_sources += rc_lib_gen.process(win32ver_rc, extra_args: [
@@ -35,7 +37,7 @@
bitcode_modules += {
'target': intarray,
- 'srcfiles': intarray_sources,
+ 'srcfiles': intarray_bitcode_sources,
}
tests += {
diff --git a/contrib/ltree/meson.build b/contrib/ltree/meson.build
--- a/contrib/ltree/meson.build
+++ b/contrib/ltree/meson.build
@@ -14,6 +14,8 @@
# .. so that includes of ltree/ltree.h work
ltree_inc = include_directories('.', '../')
+
+ltree_bitcode_sources = ltree_sources
if host_system == 'windows'
ltree_sources += rc_lib_gen.process(win32ver_rc, extra_args: [
@@ -44,7 +46,7 @@
ltree_dir = meson.current_source_dir()
bitcode_modules += {
'target': ltree,
- 'srcfiles': ltree_sources,
+ 'srcfiles': ltree_bitcode_sources,
'additional_flags': [
'-I@0@'.format(ltree_dir)
]
diff --git a/contrib/pg_trgm/meson.build b/contrib/pg_trgm/meson.build
--- a/contrib/pg_trgm/meson.build
+++ b/contrib/pg_trgm/meson.build
@@ -6,6 +6,8 @@
'trgm_op.c',
'trgm_regexp.c',
)
+
+pg_trgm_bitcode_sources = pg_trgm_sources
if host_system == 'windows'
pg_trgm_sources += rc_lib_gen.process(win32ver_rc, extra_args: [
@@ -34,7 +36,7 @@
bitcode_modules += {
'target': pg_trgm,
- 'srcfiles': pg_trgm_sources,
+ 'srcfiles': pg_trgm_bitcode_sources,
}
tests += {