From: Joel Rosdahl Date: Sun, 1 Mar 2020 21:09:37 +0000 (+0100) Subject: Rewrite absolute input path to relative X-Git-Tag: v4.0~576 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6aba3fb3b48e8dc4919b29b6807a63007ee705eb;p=thirdparty%2Fccache.git Rewrite absolute input path to relative This can now be done due to no longer using realpath in make_relative_path (e8444a38). --- diff --git a/src/ccache.cpp b/src/ccache.cpp index 1431ff35c..817798118 100644 --- a/src/ccache.cpp +++ b/src/ccache.cpp @@ -2923,16 +2923,8 @@ process_args(Context& ctx, continue; } - if (Stat::lstat(argv[i], Stat::OnError::log).is_symlink()) { - // Don't rewrite source file path if it's a symlink since - // make_relative_path resolves symlinks using realpath(3) and this leads - // to potentially choosing incorrect relative header files. See the - // "symlink to source file" test. - args_info.input_file = from_cstr(argv[i]); - } else { - // Rewrite to relative to increase hit rate. - args_info.input_file = make_relative_path(ctx, argv[i]); - } + // Rewrite to relative to increase hit rate. + args_info.input_file = make_relative_path(ctx, argv[i]); } // for if (generating_debuginfo_level_3 && !config.run_second_cpp()) {