diff options
author | rblx-kbuck <104043214+rblx-kbuck@users.noreply.github.com> | 2022-10-28 11:41:28 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-28 20:41:28 +0200 |
commit | 326256f2eba4f9b0d2219484d24eca51f4763c65 (patch) | |
tree | 3eac83d37ad4f9eafc2b6d9252147855e9099abc | |
parent | 79cb07c0b0f0992092ebef1b3c50b7ac68f6cad2 (diff) | |
download | ccache-326256f2eba4f9b0d2219484d24eca51f4763c65.tar.gz |
fix: Process the argument following a -Xarch argument (#1199)
Since there are already checks enforcing that all -Xarch arguments match
each other and -arch, we can assume that the compiler would also
interpret the following argument, so ccache should interpret it too.
Fixes #1198.
-rw-r--r-- | src/argprocessing.cpp | 2 | ||||
-rw-r--r-- | test/suites/multi_arch.bash | 4 |
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" |