meson: llvm: Use llvm-config's --cxxflags when building llvmjit
authorAndres Freund <[email protected]>
Mon, 3 Oct 2022 21:52:51 +0000 (14:52 -0700)
committerAndres Freund <[email protected]>
Mon, 3 Oct 2022 21:55:52 +0000 (14:55 -0700)
Otherwise we don't use LLVM's flags when building llvmjit_wrap.cpp and
llvmjit_inline.cpp. That can cause compile time failures if the C++ compiler
doesn't default to a new enough C++ standards version and link time failures
due to ABI influencing flags like -fno-rtti.

src/backend/jit/llvm/meson.build

index de2e624ab585ddbec46f8174452b17d608d078d7..6ae7aaad0152a00ddffb44ee2394fcdf9b319e29 100644 (file)
@@ -24,6 +24,7 @@ llvmjit = shared_module('llvmjit',
   llvmjit_sources,
   kwargs: pg_mod_args + {
     'dependencies': pg_mod_args['dependencies'] + [llvm],
+    'cpp_args': pg_mod_args['cpp_args'] + llvm.get_variable(configtool: 'cxxflags').split(),
   }
 )