summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/argprocessing.cpp2
-rw-r--r--test/suites/multi_arch.bash4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/argprocessing.cpp b/src/argprocessing.cpp
index b095b7a7..e26ca590 100644
--- a/src/argprocessing.cpp
+++ b/src/argprocessing.cpp
@@ -385,8 +385,6 @@ process_option_arg(const Context& ctx,
return Statistic::unsupported_compiler_option;
}
state.common_args.push_back(args[i]);
- state.common_args.push_back(args[i + 1]);
- ++i;
return Statistic::none;
}
diff --git a/test/suites/multi_arch.bash b/test/suites/multi_arch.bash
index e37b12fe..058bae2a 100644
--- a/test/suites/multi_arch.bash
+++ b/test/suites/multi_arch.bash
@@ -47,6 +47,10 @@ SUITE_multi_arch() {
expect_stat direct_cache_hit 3
expect_stat cache_miss 4
+ # The parameter following -Xarch should be processed.
+ $CCACHE_COMPILE -arch x86_64 -Xarch_x86_64 -analyze -I. -c test1.c
+ expect_stat unsupported_compiler_option 1
+
# -------------------------------------------------------------------------
TEST "cache hit, preprocessor mode"