# Compile a binary program which is then linked to a library
# we want to introspect, in order to call its get_type functions.
# Compile a binary program which is then linked to a library
# we want to introspect, in order to call its get_type functions.
context = g_option_context_new ("");
g_option_context_add_main_entries (context, entries, "girepository-1.0");
g_option_context_add_group (context, g_irepository_get_option_group ());
if (!g_option_context_parse (context, &argc, &argv, &error))
{
context = g_option_context_new ("");
g_option_context_add_main_entries (context, entries, "girepository-1.0");
g_option_context_add_group (context, g_irepository_get_option_group ());
if (!g_option_context_parse (context, &argc, &argv, &error))
{
# We need to reference our get_type functions to make sure they are
# pulled in at the linking stage if the library is a static library
# We need to reference our get_type functions to make sure they are
# pulled in at the linking stage if the library is a static library
def _compile(self, output, *sources):
# Not strictly speaking correct, but easier than parsing shell
args = self._compiler_cmd.split()
def _compile(self, output, *sources):
# Not strictly speaking correct, but easier than parsing shell
args = self._compiler_cmd.split()
- if self._compiler_cmd == 'gcc':
+ # Do not add -Wall when using init code as we do not include any
+ # header of the library being introspected
+ if self._compiler_cmd == 'gcc' and not self._options.init_sections: