# HG changeset patch
# Node ID ba4a905ed809
# Parent  bdae2f4577c5
diff --git a/meson.build b/meson.build
--- a/meson.build
+++ b/meson.build
@@ -127,7 +127,6 @@
 subdir('lua')
 subdir('python3')
 subdir('rust')
-subdir('tcc')
 subdir('vala')
 
 if get_option('doc')
diff --git a/meson_options.txt b/meson_options.txt
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -65,12 +65,6 @@
 )
 
 option(
-	'tcc',
-	type : 'boolean', value : false,
-	description : 'Whether or not to build the TCC plugin loader'
-)
-
-option(
 	'vapi',
 	type : 'boolean', value : true,
 	description : 'Whether or not to build vapi files for gplugin'
diff --git a/po/POTFILES b/po/POTFILES
--- a/po/POTFILES
+++ b/po/POTFILES
@@ -29,6 +29,3 @@
 python3/gplugin-python3-plugin.c
 python3/gplugin-python3-test-pygobject.c
 python3/gplugin-python3-utils.c
-tcc/gplugin-tcc-core.c
-tcc/gplugin-tcc-loader.c
-tcc/gplugin-tcc-plugin.c
diff --git a/tcc/gplugin-tcc-core.c b/tcc/gplugin-tcc-core.c
deleted file mode 100644
--- a/tcc/gplugin-tcc-core.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (C) 2011-2020 Gary Kramlich <grim@reaperworld.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <https://www.gnu.org/licenses/>.
- */
-
-#include <glib/gi18n-lib.h>
-
-#include <gplugin.h>
-#include <gplugin-native.h>
-
-#include "gplugin-tcc-loader.h"
-#include "gplugin-tcc-plugin.h"
-
-static GPluginLoader *loader = NULL;
-
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
-{
-	const gchar *const authors[] = {"Eion Robb <eion@robbmob.com>", NULL};
-
-	/* clang-format off */
-	return gplugin_plugin_info_new(
-		"gplugin/tcc-loader",
-		GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
-		"internal", TRUE,
-		"load-on-query", TRUE,
-		"name", "C source plugin loader",
-		"version", GPLUGIN_VERSION,
-		"license-id", "LGPL-2.0-or-later",
-		"summary", "A plugin that can load C source plugins",
-		"description", "This plugin allows the loading of plugins written in "
-		               "C.",
-		"authors", authors,
-		"website", GPLUGIN_WEBSITE,
-		"category", "loaders",
-		"unloadable", FALSE,
-		NULL);
-	/* clang-format on */
-}
-
-G_MODULE_EXPORT gboolean
-gplugin_load(GPluginNativePlugin *plugin, GError **error)
-{
-	GPluginManager *manager = NULL;
-
-	gplugin_tcc_loader_register(plugin);
-	gplugin_tcc_plugin_register(plugin);
-
-	manager = gplugin_manager_get_default();
-
-	loader = gplugin_tcc_loader_new();
-	if(!gplugin_manager_register_loader(manager, loader, error)) {
-		g_clear_object(&loader);
-
-		return FALSE;
-	}
-
-	return TRUE;
-}
-
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	gboolean shutdown,
-	GError **error)
-{
-	GPluginManager *manager = NULL;
-	gboolean ret = FALSE;
-
-	if(!shutdown) {
-		g_set_error_literal(
-			error,
-			GPLUGIN_DOMAIN,
-			0,
-			_("The TCC loader can not be unloaded"));
-
-		return FALSE;
-	}
-
-	manager = gplugin_manager_get_default();
-	ret = gplugin_manager_unregister_loader(manager, loader, error);
-	g_clear_object(&loader);
-
-	return ret;
-}
diff --git a/tcc/gplugin-tcc-loader.h b/tcc/gplugin-tcc-loader.h
deleted file mode 100644
--- a/tcc/gplugin-tcc-loader.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2011-2020 Gary Kramlich <grim@reaperworld.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <https://www.gnu.org/licenses/>.
- */
-#ifndef GPLUGIN_TCC_LOADER_H
-#define GPLUGIN_TCC_LOADER_H
-
-#include <gplugin.h>
-#include <gplugin-native.h>
-
-G_BEGIN_DECLS
-
-#define GPLUGIN_TCC_TYPE_LOADER (gplugin_tcc_loader_get_type())
-G_DECLARE_FINAL_TYPE(
-	GPluginTccLoader,
-	gplugin_tcc_loader,
-	GPLUGIN_TCC,
-	LOADER,
-	GPluginLoader)
-
-void gplugin_tcc_loader_register(GPluginNativePlugin *plugin);
-
-GPluginLoader *gplugin_tcc_loader_new(void);
-
-G_END_DECLS
-
-#endif /* GPLUGIN_TCC_LOADER_H */
diff --git a/tcc/gplugin-tcc-loader.c b/tcc/gplugin-tcc-loader.c
deleted file mode 100644
--- a/tcc/gplugin-tcc-loader.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * Copyright (C) 2011-2020 Gary Kramlich <grim@reaperworld.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <https://www.gnu.org/licenses/>.
- */
-
-#include "gplugin-tcc-loader.h"
-
-#include <glib/gi18n-lib.h>
-
-#include <libtcc.h>
-
-#include "gplugin-tcc-plugin.h"
-
-struct _GPluginTccLoader {
-	GPluginLoader parent;
-};
-
-G_DEFINE_DYNAMIC_TYPE(
-	GPluginTccLoader,
-	gplugin_tcc_loader,
-	GPLUGIN_TYPE_LOADER);
-
-/******************************************************************************
- * GPluginLoaderInterface API
- *****************************************************************************/
-static GSList *
-gplugin_tcc_loader_supported_extensions(G_GNUC_UNUSED GPluginLoader *l)
-{
-	return g_slist_append(NULL, "c");
-}
-
-static GPluginPlugin *
-gplugin_tcc_loader_query(
-	GPluginLoader *loader,
-	const gchar *filename,
-	GError **error)
-{
-	GPluginPlugin *plugin = NULL;
-	GPluginPluginInfo *info = NULL;
-	TCCState *s = NULL;
-	gpointer memneeded = NULL;
-	int memsize = -1;
-
-	GPluginTccPluginQueryFunc gplugin_query = NULL;
-
-	s = tcc_new();
-
-	tcc_set_output_type(s, TCC_OUTPUT_MEMORY);
-
-	if(tcc_add_file(s, filename) == -1) {
-		g_set_error(
-			error,
-			GPLUGIN_DOMAIN,
-			0,
-			"couldn't load file %s",
-			filename);
-
-		tcc_delete(s);
-
-		return NULL;
-	}
-
-	/* copy code into memory */
-	if((memsize = tcc_relocate(s, NULL)) < 0) {
-		g_set_error(
-			error,
-			GPLUGIN_DOMAIN,
-			0,
-			"couldn't work out how much memory is needed");
-
-		tcc_delete(s);
-		return NULL;
-	}
-
-	memneeded = g_malloc0(memsize);
-	if(tcc_relocate(s, memneeded) < 0) {
-		g_set_error(
-			error,
-			GPLUGIN_DOMAIN,
-			0,
-			"could not relocate plugin into memory");
-
-		tcc_delete(s);
-		g_free(memneeded);
-		return NULL;
-	}
-
-	gplugin_query =
-		(GPluginTccPluginQueryFunc)tcc_get_symbol(s, "gplugin_query");
-	if(gplugin_query == NULL) {
-		g_set_error(
-			error,
-			GPLUGIN_DOMAIN,
-			0,
-			"no gplugin_query function found");
-
-		tcc_delete(s);
-		g_free(memneeded);
-		return NULL;
-	}
-
-	info = gplugin_query(error);
-	if(info == NULL) {
-		tcc_delete(s);
-		g_free(memneeded);
-		return NULL;
-	}
-
-	/* clang-format off */
-	plugin = g_object_new(
-		GPLUGIN_TCC_TYPE_PLUGIN,
-		"filename", filename,
-		"loader", loader,
-		"state", s,
-		"memory", memneeded,
-		"info", info,
-		NULL);
-	/* clang-format on */
-
-	return plugin;
-}
-
-static gboolean
-gplugin_tcc_loader_load(
-	G_GNUC_UNUSED GPluginLoader *loader,
-	GPluginPlugin *plugin,
-	GError **error)
-{
-	GPluginTccPluginLoadFunc gplugin_load = NULL;
-	TCCState *s = gplugin_tcc_plugin_get_state(GPLUGIN_TCC_PLUGIN(plugin));
-
-	gplugin_load = (GPluginTccPluginLoadFunc)tcc_get_symbol(s, "gplugin_load");
-	if(gplugin_load == NULL) {
-		g_set_error(error, GPLUGIN_DOMAIN, 0, "no gplugin_load function found");
-
-		return FALSE;
-	}
-
-	return gplugin_load(GPLUGIN_NATIVE_PLUGIN(plugin), error);
-}
-
-static gboolean
-gplugin_tcc_loader_unload(
-	G_GNUC_UNUSED GPluginLoader *loader,
-	GPluginPlugin *plugin,
-	GError **error)
-{
-	GPluginTccPluginLoadFunc gplugin_unload = NULL;
-	TCCState *s = gplugin_tcc_plugin_get_state(GPLUGIN_TCC_PLUGIN(plugin));
-
-	gplugin_unload =
-		(GPluginTccPluginUnloadFunc)tcc_get_symbol(s, "gplugin_unload");
-	if(gplugin_unload == NULL) {
-		g_set_error(
-			error,
-			GPLUGIN_DOMAIN,
-			0,
-			"no gplugin_unload function found");
-
-		return FALSE;
-	}
-
-	return gplugin_unload(GPLUGIN_NATIVE_PLUGIN(plugin), error);
-}
-
-/******************************************************************************
- * GObject Stuff
- *****************************************************************************/
-static void
-gplugin_tcc_loader_init(G_GNUC_UNUSED GPluginTccLoader *loader)
-{
-}
-
-static void
-gplugin_tcc_loader_class_finalize(G_GNUC_UNUSED GPluginTccLoaderClass *klass)
-{
-}
-
-static void
-gplugin_tcc_loader_class_init(GPluginTccLoaderClass *klass)
-{
-	GPluginLoaderClass *loader_class = GPLUGIN_LOADER_CLASS(klass);
-
-	loader_class->supported_extensions =
-		gplugin_tcc_loader_supported_extensions;
-	loader_class->query = gplugin_tcc_loader_query;
-	loader_class->load = gplugin_tcc_loader_load;
-	loader_class->unload = gplugin_tcc_loader_unload;
-}
-
-/******************************************************************************
- * API
- *****************************************************************************/
-void
-gplugin_tcc_loader_register(GPluginNativePlugin *plugin)
-{
-	gplugin_tcc_loader_register_type(G_TYPE_MODULE(plugin));
-}
-
-GPluginLoader *
-gplugin_tcc_loader_new(void)
-{
-	/* clang-format off */
-	return GPLUGIN_LOADER(g_object_new(
-		GPLUGIN_TCC_TYPE_LOADER,
-		"id", "gplugin-tcc",
-		NULL));
-	/* clang-format on */
-}
diff --git a/tcc/gplugin-tcc-plugin.h b/tcc/gplugin-tcc-plugin.h
deleted file mode 100644
--- a/tcc/gplugin-tcc-plugin.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2011-2020 Gary Kramlich <grim@reaperworld.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <https://www.gnu.org/licenses/>.
- */
-#ifndef GPLUGIN_TCC_PLUGIN_H
-#define GPLUGIN_TCC_PLUGIN_H
-
-#include <gplugin.h>
-#include <gplugin-native.h>
-
-#include <libtcc.h>
-
-G_BEGIN_DECLS
-
-#define GPLUGIN_TCC_TYPE_PLUGIN (gplugin_tcc_plugin_get_type())
-G_DECLARE_FINAL_TYPE(
-	GPluginTccPlugin,
-	gplugin_tcc_plugin,
-	GPLUGIN_TCC,
-	PLUGIN,
-	GObject)
-
-void gplugin_tcc_plugin_register(GPluginNativePlugin *native);
-
-TCCState *gplugin_tcc_plugin_get_state(GPluginTccPlugin *plugin);
-
-typedef GPluginPluginInfo *(*GPluginTccPluginQueryFunc)(GError **error);
-typedef gboolean (
-	*GPluginTccPluginLoadFunc)(GPluginNativePlugin *plugin, GError **error);
-typedef gboolean (
-	*GPluginTccPluginUnloadFunc)(GPluginNativePlugin *plugin, GError **error);
-
-G_END_DECLS
-
-#endif /* GPLUGIN_TCC_PLUGIN_H */
diff --git a/tcc/gplugin-tcc-plugin.c b/tcc/gplugin-tcc-plugin.c
deleted file mode 100644
--- a/tcc/gplugin-tcc-plugin.c
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Copyright (C) 2011-2020 Gary Kramlich <grim@reaperworld.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <https://www.gnu.org/licenses/>.
- */
-
-#include "gplugin-tcc-plugin.h"
-
-#include <libtcc.h>
-
-/******************************************************************************
- * Typedefs
- *****************************************************************************/
-struct _GPluginTccPlugin {
-	GObject parent;
-
-	TCCState *s;
-	gpointer mem;
-
-	gchar *filename;
-	GPluginLoader *loader;
-	GPluginPluginInfo *info;
-	GPluginPluginState state;
-};
-
-/******************************************************************************
- * Enums
- *****************************************************************************/
-enum {
-	PROP_ZERO,
-	PROP_TCC_STATE,
-	PROP_MEM,
-	N_PROPERTIES,
-
-	/* overrides */
-	PROP_FILENAME = N_PROPERTIES,
-	PROP_LOADER,
-	PROP_INFO,
-	PROP_STATE
-};
-static GParamSpec *properties[N_PROPERTIES] = {
-	NULL,
-};
-
-/* I hate forward declarations... */
-static void gplugin_tcc_plugin_iface_init(GPluginPluginInterface *iface);
-
-G_DEFINE_DYNAMIC_TYPE_EXTENDED(
-	GPluginTccPlugin,
-	gplugin_tcc_plugin,
-	G_TYPE_OBJECT,
-	0,
-	G_IMPLEMENT_INTERFACE(GPLUGIN_TYPE_PLUGIN, gplugin_tcc_plugin_iface_init));
-
-/******************************************************************************
- * GPluginPlugin Implementation
- *****************************************************************************/
-static void
-gplugin_tcc_plugin_iface_init(G_GNUC_UNUSED GPluginPluginInterface *iface)
-{
-}
-
-/******************************************************************************
- * Object Stuff
- *****************************************************************************/
-static void
-gplugin_tcc_plugin_get_property(
-	GObject *obj,
-	guint param_id,
-	GValue *value,
-	GParamSpec *pspec)
-{
-	GPluginTccPlugin *plugin = GPLUGIN_TCC_PLUGIN(obj);
-
-	switch(param_id) {
-		case PROP_TCC_STATE:
-			g_value_set_pointer(value, gplugin_tcc_plugin_get_state(plugin));
-			break;
-
-		/* overrides */
-		case PROP_FILENAME:
-			g_value_set_string(value, plugin->filename);
-			break;
-		case PROP_LOADER:
-			g_value_set_object(value, plugin->loader);
-			break;
-		case PROP_INFO:
-			g_value_set_object(value, plugin->info);
-			break;
-		case PROP_STATE:
-			g_value_set_enum(value, plugin->state);
-			break;
-
-		default:
-			G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec);
-			break;
-	}
-}
-
-static void
-gplugin_tcc_plugin_set_property(
-	GObject *obj,
-	guint param_id,
-	const GValue *value,
-	GParamSpec *pspec)
-{
-	GPluginTccPlugin *plugin = GPLUGIN_TCC_PLUGIN(obj);
-
-	switch(param_id) {
-		case PROP_TCC_STATE:
-			plugin->s = g_value_get_pointer(value);
-			break;
-		case PROP_MEM:
-			plugin->mem = g_value_get_pointer(value);
-			break;
-
-		/* overrides */
-		case PROP_FILENAME:
-			plugin->filename = g_value_dup_string(value);
-			break;
-		case PROP_LOADER:
-			plugin->loader = g_value_dup_object(value);
-			break;
-		case PROP_INFO:
-			plugin->info = g_value_dup_object(value);
-			break;
-		case PROP_STATE:
-			plugin->state = g_value_get_enum(value);
-			break;
-
-		default:
-			G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec);
-			break;
-	}
-}
-
-static void
-gplugin_tcc_plugin_finalize(GObject *obj)
-{
-	GPluginTccPlugin *plugin = GPLUGIN_TCC_PLUGIN(obj);
-
-	g_clear_pointer(&plugin->s, tcc_delete);
-	g_clear_pointer(&plugin->mem, g_free);
-
-	g_clear_pointer(&plugin->filename, g_free);
-	g_clear_object(&plugin->loader);
-	g_clear_object(&plugin->info);
-
-	G_OBJECT_CLASS(gplugin_tcc_plugin_parent_class)->finalize(obj);
-}
-
-static void
-gplugin_tcc_plugin_init(G_GNUC_UNUSED GPluginTccPlugin *plugin)
-{
-}
-
-static void
-gplugin_tcc_plugin_class_finalize(G_GNUC_UNUSED GPluginTccPluginClass *klass)
-{
-}
-
-static void
-gplugin_tcc_plugin_class_init(GPluginTccPluginClass *klass)
-{
-	GObjectClass *obj_class = G_OBJECT_CLASS(klass);
-
-	obj_class->get_property = gplugin_tcc_plugin_get_property;
-	obj_class->set_property = gplugin_tcc_plugin_set_property;
-	obj_class->finalize = gplugin_tcc_plugin_finalize;
-
-	properties[PROP_TCC_STATE] = g_param_spec_pointer(
-		"tcc-state",
-		"tcc-state",
-		"The TCC compilation context for the plugin",
-		G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
-
-	properties[PROP_MEM] = g_param_spec_pointer(
-		"memory",
-		"memory",
-		"The memory allocated for the symbol table for the plugin",
-		G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
-
-	g_object_class_install_properties(obj_class, N_PROPERTIES, properties);
-
-	/* add our overrides */
-	g_object_class_override_property(obj_class, PROP_FILENAME, "filename");
-	g_object_class_override_property(obj_class, PROP_LOADER, "loader");
-	g_object_class_override_property(obj_class, PROP_INFO, "info");
-	g_object_class_override_property(obj_class, PROP_STATE, "state");
-}
-
-/******************************************************************************
- * API
- *****************************************************************************/
-void
-gplugin_tcc_plugin_register(GPluginNativePlugin *native)
-{
-	gplugin_tcc_plugin_register_type(G_TYPE_MODULE(native));
-}
-
-TCCState *
-gplugin_tcc_plugin_get_state(GPluginTccPlugin *plugin)
-{
-	g_return_val_if_fail(GPLUGIN_TCC_IS_PLUGIN(plugin), NULL);
-
-	return plugin->s;
-}
diff --git a/tcc/meson.build b/tcc/meson.build
deleted file mode 100644
--- a/tcc/meson.build
+++ /dev/null
@@ -1,35 +0,0 @@
-summary('tcc', get_option('tcc'), section : 'Loader Support', bool_yn : true)
-
-if get_option('tcc')
-	GPLUGIN_TCC_SOURCES = [
-		'gplugin-tcc-core.c',
-		'gplugin-tcc-loader.c',
-		'gplugin-tcc-plugin.c',
-	]
-
-	GPLUGIN_TCC_HEADERS = [
-		'gplugin-tcc-loader.h',
-		'gplugin-tcc-plugin.h',
-	]
-
-	if not compiler.has_header('libtcc.h')
-		error('libtcc.h not found')
-	endif
-
-	TCC = compiler.find_library('tcc')
-
-	gplugin_tcc = shared_library('gplugin-tcc',
-		GPLUGIN_TCC_SOURCES,
-		GPLUGIN_TCC_HEADERS,
-		name_prefix : '',
-		c_args : ['-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="GPlugin-TCC"'],
-		dependencies : [TCC, gplugin_dep],
-		install : true,
-		install_dir : get_option('libdir') / 'gplugin'
-	)
-
-	# Add the loader's path to our environment variable
-	devenv.append('GPLUGIN_PLUGIN_PATH', meson.current_build_dir())
-endif # tcc
-
-subdir('tests')
diff --git a/tcc/tests/meson.build b/tcc/tests/meson.build
deleted file mode 100644
--- a/tcc/tests/meson.build
+++ /dev/null
@@ -1,13 +0,0 @@
-if get_option('tcc')
-
-e = executable('test-tcc-loader', 'test-tcc-loader.c',
-	c_args : [
-		'-DTCC_LOADER_DIR="@0@/.."'.format(meson.current_build_dir()),
-		'-DTCC_PLUGIN_DIR="@0@/plugins"'.format(
-			meson.current_source_dir()),
-	],
-	link_with : gplugin_loader_tests,
-	dependencies : [GLIB, GOBJECT, TCC, gplugin_dep])
-test('TCC Loader', e)
-
-endif # tcc
diff --git a/tcc/tests/plugins/basic-plugin.c b/tcc/tests/plugins/basic-plugin.c
deleted file mode 100644
--- a/tcc/tests/plugins/basic-plugin.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2011-2020 Gary Kramlich <grim@reaperworld.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <https://www.gnu.org/licenses/>.
- */
-#include <gplugin.h>
-#include <gplugin-native.h>
-
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
-{
-	const gchar *const authors[] = {"author1", NULL};
-
-	/* clang-format off */
-	return gplugin_plugin_info_new(
-		"gplugin/native-basic-plugin",
-		0x01020304,
-		"name", "basic plugin (TCC)",
-		"category", "test",
-		"version", "version",
-		"summary", "summary",
-		"license-id", "license",
-		"description", "description",
-		"authors", authors,
-		"website", "website",
-		NULL);
-	/* clang-format on */
-}
-
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
-{
-	return TRUE;
-}
-
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED gboolean shutdown,
-	G_GNUC_UNUSED GError **error)
-{
-	return TRUE;
-}
diff --git a/tcc/tests/plugins/dependent.c b/tcc/tests/plugins/dependent.c
deleted file mode 100644
--- a/tcc/tests/plugins/dependent.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2011-2020 Gary Kramlich <grim@reaperworld.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <https://www.gnu.org/licenses/>.
- */
-#include <gplugin.h>
-#include <gplugin-native.h>
-
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
-{
-	const gchar *const dependencies[] = {"dependency1", "dependency2", NULL};
-
-	/* clang-format off */
-	return gplugin_plugin_info_new(
-		"gplugin/native-dependent-plugin",
-		GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
-		"dependencies", dependencies,
-		NULL);
-	/* clang-format on */
-}
-
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
-{
-	return TRUE;
-}
-
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED gboolean shutdown,
-	G_GNUC_UNUSED GError **error)
-{
-	return TRUE;
-}
diff --git a/tcc/tests/plugins/load-exception.c b/tcc/tests/plugins/load-exception.c
deleted file mode 100644
--- a/tcc/tests/plugins/load-exception.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2011-2020 Gary Kramlich <grim@reaperworld.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <https://www.gnu.org/licenses/>.
- */
-#include <gplugin.h>
-#include <gplugin-native.h>
-
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
-{
-	return gplugin_plugin_info_new(
-		"gplugin/native-load-exception",
-		GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
-		NULL);
-}
-
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
-{
-	return FALSE;
-}
-
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED gboolean shutdown,
-	G_GNUC_UNUSED GError **error)
-{
-	return TRUE;
-}
diff --git a/tcc/tests/plugins/load-failed.c b/tcc/tests/plugins/load-failed.c
deleted file mode 100644
--- a/tcc/tests/plugins/load-failed.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2011-2020 Gary Kramlich <grim@reaperworld.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <https://www.gnu.org/licenses/>.
- */
-#include <gplugin.h>
-#include <gplugin-native.h>
-
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
-{
-	return gplugin_plugin_info_new(
-		"gplugin/native-load-failed",
-		GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
-		NULL);
-}
-
-G_MODULE_EXPORT gboolean
-gplugin_load(G_GNUC_UNUSED GPluginNativePlugin *plugin, GError **error)
-{
-	g_set_error(error, GPLUGIN_DOMAIN, 0, "expected error");
-
-	return FALSE;
-}
-
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED gboolean shutdown,
-	G_GNUC_UNUSED GError **error)
-{
-	return TRUE;
-}
diff --git a/tcc/tests/plugins/unload-failed.c b/tcc/tests/plugins/unload-failed.c
deleted file mode 100644
--- a/tcc/tests/plugins/unload-failed.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2011-2020 Gary Kramlich <grim@reaperworld.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <https://www.gnu.org/licenses/>.
- */
-#include <gplugin.h>
-#include <gplugin-native.h>
-
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(G_GNUC_UNUSED GError **error)
-{
-	return gplugin_plugin_info_new(
-		"gplugin/native-unload-failed",
-		GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
-		NULL);
-}
-
-G_MODULE_EXPORT gboolean
-gplugin_load(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED GError **error)
-{
-	return TRUE;
-}
-
-G_MODULE_EXPORT gboolean
-gplugin_unload(
-	G_GNUC_UNUSED GPluginNativePlugin *plugin,
-	G_GNUC_UNUSED gboolean shutdown,
-	GError **error)
-{
-	g_set_error(error, GPLUGIN_DOMAIN, 0, "expected error");
-
-	return FALSE;
-}
diff --git a/tcc/tests/test-tcc-loader.c b/tcc/tests/test-tcc-loader.c
deleted file mode 100644
--- a/tcc/tests/test-tcc-loader.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2011-2020 Gary Kramlich <grim@reaperworld.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <https://www.gnu.org/licenses/>.
- */
-
-#include <glib.h>
-
-#include <gplugin.h>
-#include <gplugin/gplugin-loader-tests.h>
-
-gint
-main(gint argc, gchar **argv)
-{
-	g_test_init(&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
-
-	gplugin_loader_tests_main(TCC_LOADER_DIR, TCC_PLUGIN_DIR, "c");
-
-	return g_test_run();
-}
