Commit e78e58ef authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Tell VCC about VEXTs.

parent 7afd74d2
......@@ -85,6 +85,15 @@ vext_argument(const char *arg)
vp->argv[1], strerror(errno));
}
void
vext_iter(vext_iter_f *func, void *priv)
{
struct vext *vp;
VTAILQ_FOREACH(vp, &vext_list, list)
func(VSB_data(vp->vsb), priv);
}
void
vext_copyin(struct vsb *vident)
{
......
......@@ -134,3 +134,5 @@ void vext_argument(const char *);
void vext_copyin(struct vsb *);
void vext_load(void);
void vext_cleanup(void);
typedef void vext_iter_f(const char *, void *);
void vext_iter(vext_iter_f *func, void *);
......@@ -85,6 +85,13 @@ mgt_DumpBuiltin(void)
* Invoke system VCC compiler in a sub-process
*/
static void
vcc_vext_iter_func(const char *filename, void *priv)
{
VCC_VEXT(priv, filename);
}
static void v_noreturn_ v_matchproto_(vsub_func_f)
run_vcc(void *priv)
{
......@@ -110,6 +117,8 @@ run_vcc(void *priv)
VCC_Opt_ ## l(vcc, MGT_VCC_FEATURE(VCC_FEATURE_ ## U));
#include "tbl/vcc_feature_bits.h"
vext_iter(vcc_vext_iter_func, vcc);
STV_Foreach(stv)
VCC_Predef(vcc, "VCL_STEVEDORE", stv->ident);
VTAILQ_FOREACH(vpg, &vclhead, list)
......
......@@ -38,6 +38,7 @@ void VCC_VCL_path(struct vcc *, const char *);
void VCC_VMOD_path(struct vcc *, const char *);
void VCC_Predef(struct vcc *, const char *type, const char *name);
void VCC_VCL_Range(unsigned *, unsigned *);
void VCC_VEXT(struct vcc *, const char *);
#define VCC_FEATURE_BIT(U, l, d) \
void VCC_Opt_ ## l(struct vcc *, unsigned);
......
......@@ -956,3 +956,10 @@ VCC_Predef(struct vcc *vcc, const char *type, const char *name)
else
WRONG("Unknown VCC predef type");
}
void
VCC_VEXT(struct vcc *vcc, const char *filename)
{
CHECK_OBJ_NOTNULL(vcc, VCC_MAGIC);
(void)filename;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment