]>
git.ipfire.org Git - thirdparty/ccache.git/log
Thomas Otto [Sun, 26 Jan 2020 20:34:34 +0000 (21:34 +0100)]
Turn lock_staleness_limit into a constant
Remove now-empty legacy_globals.cpp/hpp.
Thomas Otto [Mon, 27 Jan 2020 19:22:31 +0000 (20:22 +0100)]
Context: move counters
Thomas Otto [Mon, 27 Jan 2020 18:57:23 +0000 (19:57 +0100)]
Context: move ignore_headers_len, remove cc_reset()
Thomas Otto [Sun, 26 Jan 2020 20:16:58 +0000 (21:16 +0100)]
Context: move included_pch_file and convert to std::string
Thomas Otto [Sun, 26 Jan 2020 20:14:34 +0000 (21:14 +0100)]
Context: move guessed_compiler
Thomas Otto [Sun, 26 Jan 2020 20:09:14 +0000 (21:09 +0100)]
Convert guessed_compiler into an enum class
Thomas Otto [Sun, 26 Jan 2020 20:03:55 +0000 (21:03 +0100)]
Context: move manifest_stats_file and convert to std::string
Thomas Otto [Sat, 25 Jan 2020 10:02:07 +0000 (11:02 +0100)]
Context: move cpp_stderr and convert to std::string
Thomas Otto [Sat, 25 Jan 2020 10:00:35 +0000 (11:00 +0100)]
Context: move i_tmpfile and converted to std::string
Thomas Otto [Sat, 25 Jan 2020 09:55:49 +0000 (10:55 +0100)]
Context: move has_absolute_include_headers
Thomas Otto [Sat, 25 Jan 2020 09:54:50 +0000 (10:54 +0100)]
Context: move g_included_files
Thomas Otto [Sat, 25 Jan 2020 09:49:49 +0000 (10:49 +0100)]
Context: move time_of_compilation, adapt manifest
Thomas Otto [Sat, 25 Jan 2020 09:46:54 +0000 (10:46 +0100)]
Context: move manifest_path and converted to std::string
Thomas Otto [Sat, 25 Jan 2020 09:44:12 +0000 (10:44 +0100)]
Context: move (cached_)result_name/result_path
Also convert result_path to std::string.
Thomas Otto [Sat, 25 Jan 2020 09:40:47 +0000 (10:40 +0100)]
Context: move arch_args
Thomas Otto [Fri, 24 Jan 2020 19:16:47 +0000 (20:16 +0100)]
Context: move output_is_precompiled_header
Thomas Otto [Mon, 17 Feb 2020 20:08:26 +0000 (21:08 +0100)]
Partially revert const-ification of context parameters
Joel Rosdahl [Sun, 16 Feb 2020 12:06:24 +0000 (13:06 +0100)]
Improve functions related to CWD
The different functions related to current working directory (CWD) have
become messy during the years:
- gnu_getcwd is a simple wrapper around getcwd(3), thus returning the
actual canonical path.
- get_cwd returns $PWD, falling back to getcwd(3) if $PWD is not sane.
- get_current_working_dir (local function in ccache.cpp) memoizes
x_realpath(get_cwd()) (i.e., getcwd(3) in essence...) in the global
current_working_dir variable. Unit tests may manipulate
current_working_dir.
Improve this by:
- Replacing gnu_getcwd with Util::get_actual_cwd.
- Replacing get_cwd with Util::get_apparent_cwd.
- Removing get_current_working_dir and placing both actual and apparent
CWD in the context object.
Joel Rosdahl [Sun, 16 Feb 2020 20:11:18 +0000 (21:11 +0100)]
Simplify (non-)freeing of orig_args on failure
Joel Rosdahl [Sun, 16 Feb 2020 19:44:42 +0000 (20:44 +0100)]
Simplify string creation from string_view
Joel Rosdahl [Sun, 16 Feb 2020 18:40:58 +0000 (19:40 +0100)]
Remove now redundant resetting of config
Since the configuation no longer is global there is no need to reset the
unmodified Config object passed by cct_test_begin to cc_reset.
Joel Rosdahl [Sun, 16 Feb 2020 18:14:53 +0000 (19:14 +0100)]
Const-ify context parameters where appropriate
Joel Rosdahl [Sun, 16 Feb 2020 20:12:51 +0000 (21:12 +0100)]
Merge pull request #542 from totph/ctx4
Context: g_config, stats_file and orig_args moved
Thomas Otto [Sat, 25 Jan 2020 09:38:06 +0000 (10:38 +0100)]
Context: move orig_args
Thomas Otto [Sat, 25 Jan 2020 09:24:35 +0000 (10:24 +0100)]
Context: convert stats_file to an std::string
Also adapted downstream stats functions.
Thomas Otto [Sat, 25 Jan 2020 09:24:35 +0000 (10:24 +0100)]
Context: move stats_file
Thomas Otto [Sun, 26 Jan 2020 20:34:40 +0000 (21:34 +0100)]
Context: move g_config
Joel Rosdahl [Tue, 11 Feb 2020 20:56:02 +0000 (21:56 +0100)]
Implement Util::read_link, replacing legacy x_readlink
Joel Rosdahl [Tue, 11 Feb 2020 20:34:43 +0000 (21:34 +0100)]
Implement Util::real_path, replacing legacy x_realpath
Joel Rosdahl [Sat, 15 Feb 2020 15:14:35 +0000 (16:14 +0100)]
Merge pull request #541 from totph/ctx3
Context: move 9 more globals
Thomas Otto [Fri, 24 Jan 2020 19:23:14 +0000 (20:23 +0100)]
Context: move using_precompiled_header
Thomas Otto [Fri, 24 Jan 2020 19:20:45 +0000 (20:20 +0100)]
Context: move profile_use/profile_generate
Thomas Otto [Fri, 24 Jan 2020 19:13:41 +0000 (20:13 +0100)]
Context: move direct_i_file
Thomas Otto [Fri, 24 Jan 2020 19:11:24 +0000 (20:11 +0100)]
Context: move profile_dir
Thomas Otto [Fri, 24 Jan 2020 19:01:03 +0000 (20:01 +0100)]
Context: move profile_arcs
Thomas Otto [Fri, 24 Jan 2020 18:59:21 +0000 (19:59 +0100)]
Context: move seen_split_dwarf
Thomas Otto [Fri, 24 Jan 2020 18:54:21 +0000 (19:54 +0100)]
Context: move generating_diagnostics
Thomas Otto [Fri, 24 Jan 2020 18:49:32 +0000 (19:49 +0100)]
Context: move generating_stackusage
Thomas Otto [Fri, 24 Jan 2020 18:45:36 +0000 (19:45 +0100)]
Context: move generating_coverage
Joel Rosdahl [Thu, 13 Feb 2020 20:56:54 +0000 (21:56 +0100)]
Rename clang-format.sh to run-clang-format
This avoids exposing implementation details.
Joel Rosdahl [Thu, 13 Feb 2020 20:45:33 +0000 (21:45 +0100)]
Build static Windows executables
This makes it possible to run e.g. the unittest binary in Wine.
Joel Rosdahl [Thu, 13 Feb 2020 20:32:07 +0000 (21:32 +0100)]
Simplify result_name_from_depfile signature
Joel Rosdahl [Wed, 12 Feb 2020 21:06:08 +0000 (22:06 +0100)]
Simplify Util::{base,dir}_name
This also fixes a bug in the Windows versions.
Thomas Otto [Thu, 13 Feb 2020 20:54:19 +0000 (21:54 +0100)]
Added 'make check_format' to makefile rules (#525)
'make format' formats all source files with clang-format, and
'make check_format' only checks and on failure prints a diff,
then exits with the appropriate status.
Because quick interactive formatting is one use case, xargs is
used for parallelism. Proper make-parallelism would require
-k and -j arguments to work.
Joel Rosdahl [Thu, 13 Feb 2020 20:26:14 +0000 (21:26 +0100)]
Merge pull request #538 from totph/ctx2
Context: move 7 more globals
Thomas Otto [Fri, 24 Jan 2020 18:40:14 +0000 (19:40 +0100)]
Context: move generating_dependencies
Thomas Otto [Fri, 24 Jan 2020 18:33:43 +0000 (19:33 +0100)]
Context: move actual_language
Thomas Otto [Fri, 24 Jan 2020 18:26:32 +0000 (19:26 +0100)]
Context: move output_dwo
Thomas Otto [Fri, 24 Jan 2020 18:23:17 +0000 (19:23 +0100)]
Context: move output_dia
Thomas Otto [Fri, 24 Jan 2020 18:19:25 +0000 (19:19 +0100)]
Context: move output_cu
Thomas Otto [Fri, 24 Jan 2020 18:17:54 +0000 (19:17 +0100)]
Context: move output_cov
Thomas Otto [Fri, 24 Jan 2020 18:14:00 +0000 (19:14 +0100)]
Context: move output_dep
Joel Rosdahl [Thu, 13 Feb 2020 17:58:18 +0000 (18:58 +0100)]
Test out-of-tree build in Travis-CI
Loïc Yhuel [Thu, 13 Feb 2020 17:53:32 +0000 (18:53 +0100)]
Fix out of tree build (#540)
The CPPFLAGS contain "-I.", but not "-I$(srcdir)", which means "src/ScopeGuard.hpp" was only
found when building from the source root.
Joel Rosdahl [Mon, 10 Feb 2020 20:25:38 +0000 (21:25 +0100)]
Simplify code
Joel Rosdahl [Mon, 10 Feb 2020 20:16:31 +0000 (21:16 +0100)]
Make clang-format comments stable across clang-format versions
Now at least clang-format 6, 7, 8 and 9 format all code the same.
Joel Rosdahl [Mon, 10 Feb 2020 20:14:53 +0000 (21:14 +0100)]
Fix formatting
Thomas Otto [Fri, 24 Jan 2020 17:54:04 +0000 (18:54 +0100)]
Context: move output_obj, adapt dump_debug_log_buffer_exitfn
Thomas Otto [Fri, 24 Jan 2020 17:40:21 +0000 (18:40 +0100)]
Context: add ArgsInfo and move input_file
Thomas Otto [Sun, 19 Jan 2020 17:53:41 +0000 (18:53 +0100)]
Context struct added, returned by initialize()
The goal is to eventually move almost all global state into Context.
Thomas Otto [Wed, 5 Feb 2020 21:03:24 +0000 (22:03 +0100)]
Use Config for init_log()
Joel Rosdahl [Sun, 9 Feb 2020 20:48:06 +0000 (21:48 +0100)]
Remove superfluous “>” in README
Joel Rosdahl [Sun, 9 Feb 2020 20:47:07 +0000 (21:47 +0100)]
Mention “Supported platforms, compilers and languages” page in README
Joel Rosdahl [Sat, 8 Feb 2020 22:19:18 +0000 (23:19 +0100)]
Improve the failed() and fatal() mechanisms
The failure() and fatal() functions now exit by throwing exceptions that
are caught by the top level functions. This makes it possible to “throw
Failure” in functions that don’t have access to orig_args (or the future
context object).
While at it, renamed top-level functions to better reflect their
purpose.
Joel Rosdahl [Sat, 8 Feb 2020 18:51:47 +0000 (19:51 +0100)]
Remove declaration of unimplemented warn function
Joel Rosdahl [Sat, 8 Feb 2020 17:35:37 +0000 (18:35 +0100)]
Restore sortedness of Util functions
Joel Rosdahl [Sat, 8 Feb 2020 16:14:55 +0000 (17:14 +0100)]
Use correct spelling of the verb “set up”
Thomas Otto [Sat, 8 Feb 2020 16:12:51 +0000 (17:12 +0100)]
Extract setup_config() from initialize() (#534)
Repeated initialize-calls in ccache_main_options() added duplicate exit
functions. These calls had the side effect of passing a config relevant
changes from one command line switch to the next. Instead setup_config()
is now called afterwards.
Thomas Otto [Sat, 8 Feb 2020 16:04:28 +0000 (17:04 +0100)]
Move logging into separate file (#532)
Joel Rosdahl [Fri, 7 Feb 2020 22:15:42 +0000 (23:15 +0100)]
Use apparent CWD when checking for CWD in preprocessed output
Also when checking debug prefix maps.
This fixes a problem when $PWD includes a symlink part and the user has
set “hash_dir = false”.
Closes #531.
(cherry picked from commit
92145eb0762109b5f0114a6f4de2fea7d4ac016f )
Joel Rosdahl [Fri, 7 Feb 2020 20:58:48 +0000 (21:58 +0100)]
Remove “Description” header from PR and feature issue templates
The header seems to be more in the way than being helpful.
Cristian Adam [Fri, 7 Feb 2020 20:38:24 +0000 (21:38 +0100)]
Win32: Close reading file for recompression (#535)
Fixes: https://github.com/ccache/ccache/issues/530
Joel Rosdahl [Wed, 5 Feb 2020 20:57:57 +0000 (21:57 +0100)]
Remove one more “=” from the help text
Missed in
a44ef1844b59bf902ad6015645fb0028a54f67cb .
Joel Rosdahl [Wed, 5 Feb 2020 20:46:29 +0000 (21:46 +0100)]
Improve help text and documentation of command line options
Removed the “=” in “-a, --a-long-option=VALUE” to make it easier to
understand that “-a=VALUE” isn’t supported. Also improved some of the
placeholder names.
Closes #529.
Joel Rosdahl [Wed, 5 Feb 2020 20:31:55 +0000 (21:31 +0100)]
Improve error message for “ccache -o=K=V”
Previously:
ccache: error: unknown configuration option ""
Now:
ccache: error: unknown configuration option "=K"
Related to #529.
Joel Rosdahl [Wed, 5 Feb 2020 20:17:50 +0000 (21:17 +0100)]
Log when starting/stopping recompression
Joel Rosdahl [Wed, 5 Feb 2020 19:22:25 +0000 (20:22 +0100)]
doc: Remove information that is better to have on the web site
Joel Rosdahl [Wed, 5 Feb 2020 19:01:22 +0000 (20:01 +0100)]
doc: Move description of preprocessor mode before direct mode
This way the depend mode is documented directly after the direct mode
which makes more sense since they are related.
Joel Rosdahl [Tue, 4 Feb 2020 19:26:29 +0000 (20:26 +0100)]
Add improvement issue template
Joel Rosdahl [Tue, 4 Feb 2020 19:26:25 +0000 (20:26 +0100)]
Improve issue templates
Joel Rosdahl [Tue, 28 Jan 2020 21:07:54 +0000 (22:07 +0100)]
Compensate for bug in clang-format version 8 and 9
Joel Rosdahl [Tue, 28 Jan 2020 19:35:33 +0000 (20:35 +0100)]
Add short description of ArgsInfo
As suggested by Alexander Lanin.
Joel Rosdahl [Tue, 28 Jan 2020 18:47:36 +0000 (19:47 +0100)]
Simplify code a bit
Joel Rosdahl [Mon, 27 Jan 2020 21:05:48 +0000 (22:05 +0100)]
Fix memory leak
Joel Rosdahl [Mon, 27 Jan 2020 20:57:17 +0000 (21:57 +0100)]
Refactor away the last instance of from_owned_cstr
Joel Rosdahl [Tue, 28 Jan 2020 19:47:19 +0000 (20:47 +0100)]
Merge pull request #515 from totph/cc_proc
Make cc_process_args() only use local variables
Thomas Otto [Sun, 19 Jan 2020 17:21:54 +0000 (18:21 +0100)]
Simplify make_relative_path() argument and result ownership
Thomas Otto [Sun, 19 Jan 2020 16:49:19 +0000 (17:49 +0100)]
Make cc_process_args() only use local variables
cc_process_args writes into a new ArgsInfo struct and only accesses
local variables (minus guessed_compiler). For now these are mostly
copied into the global variables again after the function call.
Most ccache.cpp global variables moved to legacy_globals.cpp.
Thomas Otto [Wed, 22 Jan 2020 18:02:04 +0000 (19:02 +0100)]
Add a ScopeGuard struct
Enables automatic cleanup of raw pointers and other resources.
For now used simplify resource management in cc_process_args.
Thomas Otto [Sun, 19 Jan 2020 16:49:19 +0000 (17:49 +0100)]
Add from_owned_cstr/from_cstr functions
Joel Rosdahl [Sat, 25 Jan 2020 12:52:29 +0000 (13:52 +0100)]
Format code with clang-format
Thomas Otto [Sat, 25 Jan 2020 12:45:42 +0000 (13:45 +0100)]
Make Config noncopyable and add clear_and_reset() method (#522)
Prevents changes from getting lost by writing them to a
temporary copy of the main Config object.
Also restore deleted comments from the move of
primary/secondary_config_path.
Thomas Otto [Sat, 25 Jan 2020 12:40:46 +0000 (13:40 +0100)]
Derive header list from source list if possible (#521)
Joel Rosdahl [Sat, 25 Jan 2020 10:25:52 +0000 (11:25 +0100)]
Skip read-only tests on file systems that lack such support
Fixes #510.
Joel Rosdahl [Sat, 25 Jan 2020 10:19:52 +0000 (11:19 +0100)]
Make failure to write a stats file a soft error (#516)
If a stats file update for some reason fails, the exception will bubble
up to ccache_main which just prints the error and exits with an error.
Let’s consider such failures non-fatal and just log them.
Joel Rosdahl [Wed, 22 Jan 2020 21:03:09 +0000 (22:03 +0100)]
Split ccache.hpp into per-.cpp file headers
This reduces code dependencies that hamper refactoring.
Joel Rosdahl [Wed, 22 Jan 2020 20:16:39 +0000 (21:16 +0100)]
Remove obsolete COMPAR_FN_T check and typedef
Thomas Otto [Tue, 21 Jan 2020 18:31:18 +0000 (19:31 +0100)]
Move global primary/secondary_config_path into Config (#514)
Alexander Lanin [Mon, 20 Jan 2020 21:54:48 +0000 (22:54 +0100)]
Ignore files from VS (Code) (#508)
Thomas Otto [Sun, 19 Jan 2020 19:47:27 +0000 (20:47 +0100)]
Make failed tests create a testdir.failed symlink (#511)
When the test suite fails 'testdir.failed' now points to the random
'testdir.9876/' directory. This make iterative debugging of failing
tests easier by always using the symlink name or re-issuing 'cd $PWD'
when 'cd'-ed into the 'testdir.failed' directory.
All artifacts can still be removed via 'rm -r testdir.*'.