#include "reduce_features.h"
#include "tests_compile.h"
-static const char *can_build(struct manifest *m)
+static const char *can_build(struct manifest *m UNNEEDED)
{
if (safe_mode)
return "Safe mode enabled";
return list;
}
-char *test_lib_list(const struct manifest *m, enum compile_type ctype)
+char *test_lib_list(const struct manifest *m, enum compile_type ctype UNNEEDED)
{
unsigned int i;
char **libs;
return ret;
}
+static char *cflags_list(const struct manifest *m, const char *iflags)
+{
+ unsigned int i;
+ char *ret = tal_strdup(m, iflags);
+
+ char **flags = get_cflags(m, m->dir, get_or_compile_info);
+ for (i = 0; flags[i]; i++)
+ tal_append_fmt(&ret, " %s", flags[i]);
+ return ret;
+}
+
static bool compile(const void *ctx,
struct manifest *m,
struct ccan_file *file,
cflags,
ctype == COMPILE_NOFEAT
? " "REDUCE_FEATURES_FLAGS : "");
+ flags = cflags_list(m, flags);
fname = temp_file(ctx, "", file->fullname);
if (!compile_and_link(ctx, file->fullname, ccan_dir,
cflags,
ctype == COMPILE_NOFEAT
? " "REDUCE_FEATURES_FLAGS : "");
+ flags = cflags_list(m, flags);
compile_and_link_async(file, time_ms, file->fullname, ccan_dir,
test_obj_list(m, link_with_module, ctype, ctype),
REGISTER_TEST(tests_compile);
-static const char *features_reduced(struct manifest *m)
+static const char *features_reduced(struct manifest *m UNNEEDED)
{
if (features_were_reduced)
return NULL;