]>
git.ipfire.org Git - thirdparty/ccache.git/log
Joel Rosdahl [Fri, 8 May 2020 19:26:33 +0000 (21:26 +0200)]
Remove obsolete ScopeGuard
Joel Rosdahl [Fri, 8 May 2020 18:17:15 +0000 (20:17 +0200)]
Upgrade string-view-lite to 1.4.0
Joel Rosdahl [Fri, 8 May 2020 18:11:53 +0000 (20:11 +0200)]
Guess compiler using substring search again
Regression in
30c10e8791bd02a8a3b13beeda875adbefa8c7ab .
Joel Rosdahl [Fri, 8 May 2020 18:03:25 +0000 (20:03 +0200)]
Remove now obsolete from_cstr function
Joel Rosdahl [Fri, 8 May 2020 18:02:31 +0000 (20:02 +0200)]
C++-ify get_result_name_from_cpp
Joel Rosdahl [Fri, 8 May 2020 05:26:14 +0000 (07:26 +0200)]
Speed up check-syntax rule
Joel Rosdahl [Fri, 8 May 2020 05:25:48 +0000 (07:25 +0200)]
Fix typo in manifest_get log message
Olle Liljenzin [Fri, 8 May 2020 17:12:05 +0000 (19:12 +0200)]
Support clang options for compiling with sampled profiles (#589)
Add support for -fprofile-sample-use and -fprofile-sample-accurate.
Joel Rosdahl [Thu, 7 May 2020 17:44:26 +0000 (19:44 +0200)]
Remove legacy args API
Joel Rosdahl [Thu, 7 May 2020 17:32:53 +0000 (19:32 +0200)]
Remove last usage of legacy args->argv wrapper
Joel Rosdahl [Thu, 7 May 2020 17:13:46 +0000 (19:13 +0200)]
Remove last usage of legacy args_strip function
Joel Rosdahl [Thu, 7 May 2020 17:12:31 +0000 (19:12 +0200)]
Remove last usage of legacy args_set function
Joel Rosdahl [Thu, 7 May 2020 17:11:44 +0000 (19:11 +0200)]
Remove last usage of legacy args_remove_first function
Joel Rosdahl [Thu, 7 May 2020 17:00:48 +0000 (19:00 +0200)]
Remove last usage of legacy args_pop function
Joel Rosdahl [Thu, 7 May 2020 16:58:45 +0000 (18:58 +0200)]
Remove last usage of legacy args_init_from_string function
Joel Rosdahl [Thu, 7 May 2020 16:57:57 +0000 (18:57 +0200)]
Remove last usage of legacy args_init_from_gcc_atfile function
Joel Rosdahl [Thu, 7 May 2020 16:57:15 +0000 (18:57 +0200)]
Remove last usage of legacy args_init function
Joel Rosdahl [Thu, 7 May 2020 16:56:07 +0000 (18:56 +0200)]
Remove last usage of legacy args_extend function
Joel Rosdahl [Thu, 7 May 2020 16:54:45 +0000 (18:54 +0200)]
Remove last usage of legacy args_add_prefix function
Joel Rosdahl [Thu, 7 May 2020 16:53:36 +0000 (18:53 +0200)]
Remove last usage of legacy args_add function
Joel Rosdahl [Thu, 7 May 2020 16:32:10 +0000 (18:32 +0200)]
C++-ify process_args
Joel Rosdahl [Thu, 7 May 2020 16:18:46 +0000 (18:18 +0200)]
Extract code for handling dependency environment variables to a function
Joel Rosdahl [Wed, 6 May 2020 19:47:32 +0000 (21:47 +0200)]
C++-ify final parts of process_arg
Joel Rosdahl [Wed, 6 May 2020 19:32:22 +0000 (21:32 +0200)]
C++-ify language functions
Joel Rosdahl [Wed, 6 May 2020 17:07:40 +0000 (19:07 +0200)]
C++-ify parts of process_arg
Joel Rosdahl [Wed, 6 May 2020 16:29:29 +0000 (18:29 +0200)]
C++-ify compopt functions somewhat
Joel Rosdahl [Wed, 6 May 2020 11:34:26 +0000 (13:34 +0200)]
Remove obsolete CHECK_DOUBLE_EQ macro
Joel Rosdahl [Wed, 6 May 2020 11:31:34 +0000 (13:31 +0200)]
Remove obsolete path_exists function
Joel Rosdahl [Tue, 5 May 2020 18:31:24 +0000 (20:31 +0200)]
Handle Intel compiler option “-xHost” correctly
Fixes #587.
Joel Rosdahl [Tue, 5 May 2020 13:02:13 +0000 (15:02 +0200)]
Use args[i] consistently to refer to the argument in process_arg
A shorter alias is nice but breaks symmetry when code needs to process
args[i + 1], etc.
Joel Rosdahl [Tue, 5 May 2020 12:59:06 +0000 (14:59 +0200)]
C++-ify -optf/--options-file processing in process_arg
This also makes the implementation acually work with multiple option
files delimited by commas.
Joel Rosdahl [Tue, 5 May 2020 12:58:07 +0000 (14:58 +0200)]
C++-ify parts of process_arg
Joel Rosdahl [Tue, 5 May 2020 12:55:39 +0000 (14:55 +0200)]
Improve Args::from_gcc_atfile
Scanning for the null character from the string is more efficient.
Joel Rosdahl [Sun, 3 May 2020 07:23:40 +0000 (09:23 +0200)]
Simplify detect_pch
Joel Rosdahl [Sat, 2 May 2020 11:18:04 +0000 (13:18 +0200)]
C++-ify detect_pch
Joel Rosdahl [Sat, 2 May 2020 11:07:55 +0000 (13:07 +0200)]
C++-ify ArgumentProcessingState members
Joel Rosdahl [Sat, 2 May 2020 11:05:18 +0000 (13:05 +0200)]
Improve ordering of ArgumentProcessingState members
Joel Rosdahl [Sat, 2 May 2020 10:55:57 +0000 (12:55 +0200)]
C++-ify ArgsInfo::debug_prefix_maps
Joel Rosdahl [Sat, 2 May 2020 10:46:39 +0000 (12:46 +0200)]
C++-ify ArgsInfo::arch_args
Joel Rosdahl [Sat, 2 May 2020 07:15:53 +0000 (09:15 +0200)]
C++-ify ArgsInfo::sanitize_blacklists
Joel Rosdahl [Fri, 1 May 2020 20:45:36 +0000 (22:45 +0200)]
Extract argument processing code to a separate file
Joel Rosdahl [Mon, 4 May 2020 20:30:03 +0000 (22:30 +0200)]
Fix build error with --enable-tracing
Joel Rosdahl [Fri, 1 May 2020 20:44:01 +0000 (22:44 +0200)]
Extract make_relative_path to Util
Joel Rosdahl [Fri, 1 May 2020 20:50:27 +0000 (22:50 +0200)]
Don’t regenerate version.cpp on every build
This fixes a problem where version.o will always be out-of-date, thus
triggering a rebuild and relink (regression in
827237fd ).
Joel Rosdahl [Fri, 1 May 2020 17:51:49 +0000 (19:51 +0200)]
Add Args::empty method
Joel Rosdahl [Fri, 1 May 2020 17:44:03 +0000 (19:44 +0200)]
Let process_args use orig_args from ctx
Olle Liljenzin [Sun, 3 May 2020 12:11:29 +0000 (14:11 +0200)]
Don't depend on how echo interprets backslash escapes (#588)
The escape sequence '\n' should be translated to a new line character
when printed to version.cpp. Default mode might be implementation
dependent. At least in Fedora /usr/bin/echo defaults to -E. On the
other hand older versions might not support the -e option that enables
backslash escapes where it is not default.
Split the command into two, one for each output line, which should
produce same output on all platforms.
Joel Rosdahl [Fri, 1 May 2020 15:06:10 +0000 (17:06 +0200)]
Fix variable shadowing after
d0eb89de
Joel Rosdahl [Thu, 30 Apr 2020 06:29:31 +0000 (08:29 +0200)]
Improve handling of profiling options
Handling of -fprofile-{generate,use}[=path] was implemented in PR #2
(2011). ccache has since then gained support for Clang, which is not
GCC-compatible for -fprofile-{generate,use}[=path]. Furthermore, GCC 9
changed the semantics of -fprofile-{generate,use}=path, making it
incompatible with ccache’s original implementation.
One crucial problem with the implementation is that there is no error
handling when the expected profiling data file cannot be found. This
means that there will be false positives cache hits for Clang and GCC
9+.
Fix this by:
* Checking for different profiling data file locations to handle
different compilers and versions.
* Bailing out if no profiling data file can be found.
Also:
* Implemented support for Clang’s -fprofile-instr-{generate,use}[=path]
options.
* Implemented support for -fauto-profile[=path].
* Removed the conversion of absolute path to the profile directory.
91a2954e says that the directory is rewritten to increase the hit
rate, but I don’t understand how that could be the case.
* Added tests for the profiling options. Exception:
-fauto-profile[=path], since that would require running the perf tool.
Fixes #582.
(cherry picked from commit
c9fdcef576dd13a2ea2355bcd866b5c561cb1562 )
Joel Rosdahl [Mon, 27 Apr 2020 16:23:56 +0000 (18:23 +0200)]
Whitelist clang-tidy warning cppcoreguidelines-pro-type-const-cast
We’re using const_cast for the argument argv to execve(2) which doesn’t
modify the argument.
Joel Rosdahl [Mon, 27 Apr 2020 16:14:45 +0000 (18:14 +0200)]
Don’t construct std::string from nullptr
As suggested by clang-tidy.
Joel Rosdahl [Mon, 27 Apr 2020 16:13:38 +0000 (18:13 +0200)]
Use empty() to check for emptiness
As suggested by clang-tidy.
Joel Rosdahl [Mon, 27 Apr 2020 15:01:57 +0000 (17:01 +0200)]
Work around false positive clang-tidy warning about redundant .c_str()
Joel Rosdahl [Mon, 27 Apr 2020 15:01:49 +0000 (17:01 +0200)]
Remove redundant .c_str() calls
As suggested by clang-tidy.
Joel Rosdahl [Mon, 27 Apr 2020 14:52:13 +0000 (16:52 +0200)]
Handle self-assignment in Args::operator=
As suggested by clang-tidy.
Joel Rosdahl [Mon, 27 Apr 2020 14:39:02 +0000 (16:39 +0200)]
Add noexcept to Args move constructor/operator=
As suggested by clang-tidy.
Joel Rosdahl [Sun, 26 Apr 2020 19:39:24 +0000 (21:39 +0200)]
Clean up version output test
Joel Rosdahl [Sun, 26 Apr 2020 18:59:44 +0000 (20:59 +0200)]
Mention the “always use curly braces” convention in CONTRIBUTING.md
Joel Rosdahl [Sun, 26 Apr 2020 18:25:52 +0000 (20:25 +0200)]
Fix syntax of src/.clang-tidy
Joel Rosdahl [Tue, 21 Apr 2020 19:05:05 +0000 (21:05 +0200)]
Indent .sh files with 4 spaces
megatesla [Sun, 26 Apr 2020 18:19:51 +0000 (13:19 -0500)]
Disable hardlink testing on AFS (#584)
AFS sort of supports hardlinks, but not really - you can only hardlink
within directories, not across them. This means that the hardlink test
suite probe will pass, but ccache is unable to create hardlinks to its
cache directory and the test suite will fail. Modify
SUITE_hardlink_PROBE() to use a cross-directory hardlink to correctly
detect this case.
Co-authored-by: Alexander Lanin <alex@lanin.de>
Co-authored-by: Joel Rosdahl <joel@rosdahl.net>
Alexander Lanin [Sun, 26 Apr 2020 18:13:21 +0000 (20:13 +0200)]
Extract formatting logic from make (#585)
This way it is executable without running configure first.
Alexander Lanin [Sun, 26 Apr 2020 18:08:06 +0000 (20:08 +0200)]
Add test for human readable version output (#583)
Joel Rosdahl [Tue, 21 Apr 2020 18:45:02 +0000 (20:45 +0200)]
Make update authors script find Co-authored-by that is not in trailer
Joel Rosdahl [Tue, 21 Apr 2020 18:44:37 +0000 (20:44 +0200)]
Clean up update authors script
Alexander Lanin [Tue, 21 Apr 2020 18:41:48 +0000 (20:41 +0200)]
Diverse CMake preparations (#580)
* Prepare gitignore for builds in subdirectory
* Ignore to be generated Version.cpp
* Move travis to buildenv as it's just another image
* Move install_cuda out of .travis as it's not travis specific
* Prepare docker images for C++ and CMake
* Update authors + add script to do so
* Fix required C compiler
* Fix some formatting issues with clang-format 10
Joel Rosdahl [Tue, 21 Apr 2020 18:00:11 +0000 (20:00 +0200)]
Remove obsolete unittest/test_lockfile.cpp
It should have been removed in
c181fdd9 .
Fixes #581. See also #569.
Joel Rosdahl [Sun, 19 Apr 2020 20:35:32 +0000 (22:35 +0200)]
Move calculation of “result/manifest globals” into Context
Joel Rosdahl [Sun, 19 Apr 2020 20:21:50 +0000 (22:21 +0200)]
Make Context a class instead of a struct
I like it better that way.
Joel Rosdahl [Sun, 19 Apr 2020 19:46:20 +0000 (21:46 +0200)]
Remove unused #include
Joel Rosdahl [Sun, 19 Apr 2020 14:51:46 +0000 (16:51 +0200)]
Call update_manifest_file in do_cache_compilation()
This reduces complexity of from_cache() and to_cache() somewhat.
Joel Rosdahl [Sun, 19 Apr 2020 14:47:00 +0000 (16:47 +0200)]
C++-ify Context::result_name
Joel Rosdahl [Sat, 18 Apr 2020 16:32:57 +0000 (18:32 +0200)]
C++-ify Context::ignore_headers
Joel Rosdahl [Sat, 18 Apr 2020 16:31:24 +0000 (18:31 +0200)]
Refactor context initialization code into a new set_up_context function
Joel Rosdahl [Sat, 18 Apr 2020 16:27:42 +0000 (18:27 +0200)]
Add Util::matches_dir_prefix_or_file helper function
To be used for “ignore_headers_in_manifest”.
Joel Rosdahl [Sat, 18 Apr 2020 16:27:10 +0000 (18:27 +0200)]
Add cross-platform Util::is_dir_separator helper function
Joel Rosdahl [Fri, 17 Apr 2020 20:33:27 +0000 (22:33 +0200)]
Remove now superfluous cast to (void)
Joel Rosdahl [Fri, 17 Apr 2020 20:30:19 +0000 (22:30 +0200)]
Clean up function signatures with (void)
Joel Rosdahl [Fri, 17 Apr 2020 18:23:08 +0000 (20:23 +0200)]
Merge pull request #555 from totph/rm_strtok
Thomas Otto [Thu, 19 Mar 2020 21:51:14 +0000 (22:51 +0100)]
Remove legacy strtok_r()
Thomas Otto [Thu, 19 Mar 2020 21:50:26 +0000 (22:50 +0100)]
Adapt hash_common_info() to use split_into_strings()
Thomas Otto [Thu, 19 Mar 2020 21:50:01 +0000 (22:50 +0100)]
Adapt *_depfile() functions to use split_into_views()/_strings()
Thomas Otto [Thu, 19 Mar 2020 21:47:51 +0000 (22:47 +0100)]
Adapt process_preprocessed_file() to use split_into_strings()
Thomas Otto [Thu, 19 Mar 2020 21:47:19 +0000 (22:47 +0100)]
Adapt hash_command_output() to use split_into_strings()
Thomas Otto [Tue, 3 Mar 2020 22:24:54 +0000 (23:24 +0100)]
Adapt dependencies_env processing to use split_into_views()
Thomas Otto [Tue, 3 Mar 2020 22:21:18 +0000 (23:21 +0100)]
Adapt find_executable() to use split_into_strings()
Joel Rosdahl [Thu, 16 Apr 2020 19:25:19 +0000 (21:25 +0200)]
Make win32getshell() return std::string
Thomas Otto [Tue, 3 Mar 2020 22:19:44 +0000 (23:19 +0100)]
Adapt args_init_from_string() to use split_into_strings()
Thomas Otto [Tue, 3 Mar 2020 22:16:44 +0000 (23:16 +0100)]
Adapt add_prefix() to use split_into_strings()
Thomas Otto [Tue, 3 Mar 2020 22:14:05 +0000 (23:14 +0100)]
Util: Add split_into_views/split_into_strings functions
Thomas Otto [Thu, 19 Mar 2020 21:41:55 +0000 (22:41 +0100)]
Util: Don’t include path in error description from read_file/write_file
By only returning the error description the caller is more flexible when
composing their own error message.
Joel Rosdahl [Tue, 14 Apr 2020 19:05:39 +0000 (21:05 +0200)]
Upgrade to fmt 6.2.0
Joel Rosdahl [Thu, 9 Apr 2020 17:23:11 +0000 (19:23 +0200)]
Improve order of Travis CI jobs
Joel Rosdahl [Thu, 9 Apr 2020 17:20:53 +0000 (19:20 +0200)]
Improve Travis CI job descriptions
Joel Rosdahl [Thu, 9 Apr 2020 13:46:52 +0000 (15:46 +0200)]
Fix typos in 64-bit MinGW Travis CI job
Joel Rosdahl [Tue, 7 Apr 2020 20:16:53 +0000 (22:16 +0200)]
Add test case for Args::from_gcc_atfile
Joel Rosdahl [Tue, 7 Apr 2020 19:54:30 +0000 (21:54 +0200)]
Add an Args class with backward compatibility for the old args API (#575)
The idea of this is to make a proper C++ API while at the same time
implementing most of the old legacy args API. This makes it possible to
refactor call sites gradually instead of in a series of large
refactoring steps.
Given that “struct args* args” is replaced with “Args args”, the
following types of legacy API usage can be kept without source changes:
1. The args_* functions can be used as is.
2. args->argv[i] still works for read access.
Things that aren’t emulated:
1. args->argc (use args.size() instead).
2. args->argv to access the underlying char* array (use
args.to_argv().data() instead).
3. Mutating the args->argv[i] string in place (don’t do that).
In other words, code that uses args_foo(args, ...) and args->argv[i] can
easily be converted to args.bar(...) and args[i] (with std::string
arguments instead of char*) at will and in arbitrarily small steps.
Philipp Storz [Mon, 6 Apr 2020 19:50:27 +0000 (21:50 +0200)]
Make ccache build on Solaris 11.4 (#572)
These changes enable building on Oracle Solaris 11.4 for both i386 and sparc.
Alexander Lanin [Mon, 6 Apr 2020 19:46:40 +0000 (21:46 +0200)]
Enable check_format and clang-tidy checks in CI (#562)
Joel Rosdahl [Sun, 5 Apr 2020 17:23:45 +0000 (19:23 +0200)]
Improve const-ness of parameters related to argv