diff options
author | midipix <writeonce@midipix.org> | 2016-03-06 13:41:47 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-03-08 14:21:07 -0500 |
commit | 53f4ecfce0579e4e7893dc4ef94f5e50f5db2f4f (patch) | |
tree | 974fe6479f97cced723bdbb4f9c8e85b41fdf341 | |
parent | 071d14658f92af8e478e1941a9d82cb8ab3079d6 (diff) | |
download | slibtool-53f4ecfce0579e4e7893dc4ef94f5e50f5db2f4f.tar.bz2 slibtool-53f4ecfce0579e4e7893dc4ef94f5e50f5db2f4f.tar.xz |
driver: added context initialization for --tag.
-rw-r--r-- | include/slibtool/slibtool.h | 7 | ||||
-rw-r--r-- | src/driver/slbt_driver_ctx.c | 8 |
2 files changed, 15 insertions, 0 deletions
diff --git a/include/slibtool/slibtool.h b/include/slibtool/slibtool.h index ed05880..5cb60c6 100644 --- a/include/slibtool/slibtool.h +++ b/include/slibtool/slibtool.h @@ -48,6 +48,12 @@ enum slbt_mode { SLBT_MODE_UNINSTALL, }; +enum slbt_tag { + SLBT_TAG_UNKNOWN, + SLBT_TAG_CC, + SLBT_TAG_CXX, +}; + /* unit action flags */ struct slbt_input { @@ -60,6 +66,7 @@ struct slbt_common_ctx { uint64_t actflags; uint64_t fmtflags; enum slbt_mode mode; + enum slbt_tag tag; }; struct slbt_driver_ctx { diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c index 3eb7231..8d586cd 100644 --- a/src/driver/slbt_driver_ctx.c +++ b/src/driver/slbt_driver_ctx.c @@ -154,6 +154,14 @@ int slbt_get_driver_ctx( case TAG_DRY_RUN: cctx.drvflags |= SLBT_DRIVER_DRY_RUN; break; + + case TAG_TAG: + if (!strcmp("CC",entry->arg)) + cctx.tag = SLBT_TAG_CC; + + else if (!strcmp("CXX",entry->arg)) + cctx.tag = SLBT_TAG_CXX; + break; } } else nunits++; |