closedir(dir);
}
+// Note that these compiler checks are unreliable, so nothing should
+// hard-depend on them.
+
+static bool
+compiler_is_clang(struct args *args)
+{
+ char *name = basename(args->argv[0]);
+ bool result = strstr(name, "clang") != NULL;
+ free(name);
+ return result;
+}
+
+static bool
+compiler_is_gcc(struct args *args)
+{
+ char *name = basename(args->argv[0]);
+ bool result = strstr(name, "gcc") || strstr(name, "g++");
+ free(name);
+ return result;
+}
+
+static bool
+compiler_is_pump(struct args *args)
+{
+ char *name = basename(args->argv[0]);
+ bool result = str_eq(name, "pump") || str_eq(name, "distcc-pump");
+ free(name);
+ return result;
+}
+
static char *
get_current_working_dir(void)
{
}
}
-static bool
-compiler_is_pump(struct args *args)
-{
- char *name = basename(args->argv[0]);
- bool result = str_eq(name, "pump") || str_eq(name, "distcc-pump");
- free(name);
- return result;
-}
-
// Run the real compiler and put the result in cache.
static void
to_cache(struct args *args)
}
}
-// Note that these compiler checks are unreliable, so nothing should
-// hard-depend on them.
-
-static bool
-compiler_is_clang(struct args *args)
-{
- char *name = basename(args->argv[0]);
- bool result = strstr(name, "clang") != NULL;
- free(name);
- return result;
-}
-
-static bool
-compiler_is_gcc(struct args *args)
-{
- char *name = basename(args->argv[0]);
- bool result = strstr(name, "gcc") || strstr(name, "g++");
- free(name);
- return result;
-}
-
// Update a hash sum with information common for the direct and preprocessor
// modes.
static void