}
// 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;
}
} 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;
}
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()
#include "legacy_globals.hpp"
-// The original argument list.
-extern struct args* orig_args;
-struct args* orig_args = nullptr;
-
-// Array for storing -arch options.
-size_t arch_args_size = 0;
-char* arch_args[MAX_ARCH_ARGS] = {nullptr};
-
// Name (represented as a struct digest) of the file containing the cached
// result.
struct digest* cached_result_name;