From: Joel Rosdahl Date: Sat, 12 Jan 2019 13:22:09 +0000 (+0100) Subject: Tweak comments X-Git-Tag: v3.6~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c405b271f0fda934f2f823e94974b01b68d2452;p=thirdparty%2Fccache.git Tweak comments --- diff --git a/src/ccache.c b/src/ccache.c index af2461203..b4cdb865f 100644 --- a/src/ccache.c +++ b/src/ccache.c @@ -3079,10 +3079,11 @@ cc_process_args(struct args *args, struct args **preprocessor_args, } } // for - // See http://gcc.gnu.org/onlinedocs/cpp/Environment-Variables.html + // See . // Contrary to what the documentation seems to imply the compiler still - // creates object files with these defined (confirmed with GCC 8.2.1) - // These environment variables do nothing on CLANG + // creates object files with these defined (confirmed with GCC 8.2.1), i.e. + // they work as -MMD/-MD, not -MM/-M. These environment variables do nothing + // on Clang. char *dependencies_env = getenv("DEPENDENCIES_OUTPUT"); bool using_sunpro_dependencies = false; if (!dependencies_env) { @@ -3098,12 +3099,14 @@ cc_process_args(struct args *args, struct args **preprocessor_args, free(output_dep); output_dep = make_relative_path(x_strdup(abspath_file)); - // Specifying target object is optional + // Specifying target object is optional. char *abspath_obj = strtok_r(NULL, " ", &saveptr); if (abspath_obj) { + // It's the "file target" form. + dependency_target_specified = true; char *relpath_obj = make_relative_path(x_strdup(abspath_obj)); - // ensure compiler gets relative path + // Ensure compiler gets relative path. char *relpath_both = format("%s %s", output_dep, relpath_obj); if (using_sunpro_dependencies) { x_setenv("SUNPRO_DEPENDENCIES", relpath_both); @@ -3113,8 +3116,10 @@ cc_process_args(struct args *args, struct args **preprocessor_args, free(relpath_obj); free(relpath_both); } else { + // It's the "file" form. + dependency_implicit_target_specified = true; - // ensure compiler gets relative path + // Ensure compiler gets relative path. if (using_sunpro_dependencies) { x_setenv("SUNPRO_DEPENDENCIES", output_dep); } else { diff --git a/test/suites/direct_gcc.bash b/test/suites/direct_gcc.bash index 997b3f0bc..4eb9bf6b5 100644 --- a/test/suites/direct_gcc.bash +++ b/test/suites/direct_gcc.bash @@ -139,4 +139,4 @@ SUITE_direct_gcc() { expect_stat 'cache miss' 1 expect_equal_files different_name.d expected_sunpro_dependencies_target.d expect_equal_object_files reference_test.o test.o -} \ No newline at end of file +}