summaryrefslogtreecommitdiffhomepage
path: root/src/logic
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-02-10 23:51:58 +0000
committermidipix <writeonce@midipix.org>2024-02-10 23:51:58 +0000
commitaed569cdba5e973a048607b0ca74042c240d4db8 (patch)
treeb1a7fa1a3c4ebf679b847bf953fb0aefe0138cba /src/logic
parentd4e0f6ee0cf86349c5b7420e50c1f2063ae9545b (diff)
downloadslibtool-aed569cdba5e973a048607b0ca74042c240d4db8.tar.bz2
slibtool-aed569cdba5e973a048607b0ca74042c240d4db8.tar.xz
compile mode: filter out all -f switches when compiling in --tag=RC mode.
Diffstat (limited to 'src/logic')
-rw-r--r--src/logic/slbt_exec_compile.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/logic/slbt_exec_compile.c b/src/logic/slbt_exec_compile.c
index 522d1fe..3941bf6 100644
--- a/src/logic/slbt_exec_compile.c
+++ b/src/logic/slbt_exec_compile.c
@@ -103,7 +103,8 @@ static int slbt_exec_compile_finalize_argument_vector(
base++;
}
- /* join all other args, starting with de-duplicated -I arguments */
+ /* join all other args, starting with de-duplicated -I arguments, */
+ /* and filter out all -f switches when compiling in --tag=RC mode */
src = aargv;
cap = aarg;
dst = &base[1];
@@ -130,7 +131,12 @@ static int slbt_exec_compile_finalize_argument_vector(
src = aargv;
for (; src<cap; ) {
- if (((*src)[0] != '-') || ((*src)[1] != 'I'))
+ if ((dctx->cctx->tag == SLBT_TAG_RC)
+ && ((*src)[0] == '-')
+ && ((*src)[1] == 'f'))
+ (void)0;
+
+ else if (((*src)[0] != '-') || ((*src)[1] != 'I'))
*dst++ = *src;
src++;