diff options
author | Thomas Otto <thomas.otto@pdv-fs.de> | 2020-01-25 10:40:47 +0100 |
---|---|---|
committer | Thomas Otto <thomas.otto@pdv-fs.de> | 2020-02-17 21:38:59 +0100 |
commit | 68fef769210705cabe22b269a43738533ab73839 (patch) | |
tree | ed7b5b2baca6efc6c806dfc176904151ad5d2799 /src/ccache.cpp | |
parent | f2cd5dec0a7b7a8e1354e1a905bc48be966909cb (diff) | |
download | ccache-68fef769210705cabe22b269a43738533ab73839.tar.gz ccache-68fef769210705cabe22b269a43738533ab73839.tar.bz2 ccache-68fef769210705cabe22b269a43738533ab73839.zip |
Context: move arch_args
Diffstat (limited to 'src/ccache.cpp')
-rw-r--r-- | src/ccache.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/ccache.cpp b/src/ccache.cpp index 7d4f5764..3b01c187 100644 --- a/src/ccache.cpp +++ b/src/ccache.cpp @@ -1927,9 +1927,9 @@ calculate_result_name(Context& ctx, } // Adding -arch to hash since cpp output is affected. - for (size_t i = 0; i < arch_args_size; ++i) { + for (size_t i = 0; i < ctx.args_info.arch_args_size; ++i) { hash_delimiter(hash, "-arch"); - hash_string(hash, arch_args[i]); + hash_string(hash, ctx.args_info.arch_args[i]); } struct digest* result_name = NULL; @@ -1998,16 +1998,17 @@ calculate_result_name(Context& ctx, } } else { assert(preprocessor_args); - if (arch_args_size == 0) { + if (ctx.args_info.arch_args_size == 0) { result_name = get_result_name_from_cpp(ctx, preprocessor_args, hash); cc_log("Got result name from preprocessor"); } else { args_add(preprocessor_args, "-arch"); - for (size_t i = 0; i < arch_args_size; ++i) { - args_add(preprocessor_args, arch_args[i]); + for (size_t i = 0; i < ctx.args_info.arch_args_size; ++i) { + args_add(preprocessor_args, ctx.args_info.arch_args[i]); result_name = get_result_name_from_cpp(ctx, preprocessor_args, hash); - cc_log("Got result name from preprocessor with -arch %s", arch_args[i]); - if (i != arch_args_size - 1) { + cc_log("Got result name from preprocessor with -arch %s", + ctx.args_info.arch_args[i]); + if (i != ctx.args_info.arch_args_size - 1) { free(result_name); result_name = NULL; } @@ -3684,11 +3685,6 @@ do_cache_compilation(Context& ctx, char* argv[]) failed(); // stats_update is called in cc_process_args. } - arch_args_size = ctx.args_info.arch_args_size; - for (size_t i = 0; i < ctx.args_info.arch_args_size; ++i) { - arch_args[i] = x_strdup(ctx.args_info.arch_args[i]); - } - MTR_END("main", "process_args"); if (ctx.config.depend_mode() |