summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/slibtool/slibtool.h2
-rw-r--r--src/driver/slbt_driver_ctx.c4
-rw-r--r--src/internal/slibtool_driver_impl.h1
-rw-r--r--src/skin/slbt_skin_default.c6
4 files changed, 13 insertions, 0 deletions
diff --git a/include/slibtool/slibtool.h b/include/slibtool/slibtool.h
index 1d78ab1..0e9f471 100644
--- a/include/slibtool/slibtool.h
+++ b/include/slibtool/slibtool.h
@@ -57,6 +57,8 @@ extern "C" {
#define SLBT_DRIVER_IMAGE_PE 0x400000
#define SLBT_DRIVER_IMAGE_MACHO 0x800000
+#define SLBT_DRIVER_ALL_STATIC 0x01000000
+
/* execution modes */
enum slbt_mode {
SLBT_MODE_UNKNOWN,
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c
index 97248c8..8caa5cb 100644
--- a/src/driver/slbt_driver_ctx.c
+++ b/src/driver/slbt_driver_ctx.c
@@ -807,6 +807,10 @@ int slbt_get_driver_ctx(
cctx.drvflags |= SLBT_DRIVER_MODULE;
break;
+ case TAG_ALL_STATIC:
+ cctx.drvflags |= SLBT_DRIVER_ALL_STATIC;
+ break;
+
case TAG_AVOID_VERSION:
cctx.drvflags |= SLBT_DRIVER_AVOID_VERSION;
break;
diff --git a/src/internal/slibtool_driver_impl.h b/src/internal/slibtool_driver_impl.h
index b7a089f..9e0872f 100644
--- a/src/internal/slibtool_driver_impl.h
+++ b/src/internal/slibtool_driver_impl.h
@@ -45,6 +45,7 @@ enum app_tags {
TAG_PREFER_NON_PIC,
TAG_SHARED,
TAG_STATIC,
+ TAG_ALL_STATIC,
TAG_NO_UNDEFINED,
TAG_MODULE,
TAG_AVOID_VERSION,
diff --git a/src/skin/slbt_skin_default.c b/src/skin/slbt_skin_default.c
index 3d2d78f..a9fffa7 100644
--- a/src/skin/slbt_skin_default.c
+++ b/src/skin/slbt_skin_default.c
@@ -114,6 +114,12 @@ const struct argv_option slbt_default_options[] = {
"object name need not follow the platform's "
"library naming conventions"},
+ {"all-static", 0,TAG_ALL_STATIC,ARGV_OPTARG_NONE,
+ ARGV_OPTION_HYBRID_ONLY,0,0,
+ "for programs, create a zero-dependency, "
+ "statically linked binary; for libraries, "
+ "only create an archive of non-pic objects"},
+
{"avoid-version", 0,TAG_AVOID_VERSION,ARGV_OPTARG_NONE,
ARGV_OPTION_HYBRID_ONLY,0,0,
"do not store version information, "