summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* chore: Update NEWSv4.6.34.6-maintJoel Rosdahl2022-08-271-1/+8
|
* test: Disable "output file failure" test for unsupported filesystemJoel Rosdahl2022-08-271-11/+16
| | | | | | | | | | The "Failure to write output file" test assumes that the filesystem supports read-only directories. Improve this by probing this assumption before running the test. Fixes #1150. (cherry picked from commit 553fc98f846bf6de1566e8526f4a779b70d814c8)
* chore: Update NEWSJoel Rosdahl2022-08-271-0/+21
|
* fix: Use -P -Fi for saving MSVC preprocessor outputJoel Rosdahl2022-08-251-6/+12
| | | | | | | | | | | Even though MSVC supports "-E" and "-c -o" it apparently doesn't support "-E -o", so [1] broke MSVC. [1]: 64fc42ca2c5c9fe60ef4f1dc3882edb5f35579d6 Fixes #1146. (cherry picked from commit 80a228c3c2014d9953b51ed3ade7ad21f50912f8)
* fix: Fix build with musl when using GCC 12 (#1145)Khem Raj2022-08-252-0/+3
| | | | (cherry picked from commit bb72cc26bc91bc56567dbef608088a9437f836bb)
* fix: Detect PCH for concatenated -include optionJoel Rosdahl2022-08-252-13/+21
| | | | | | Fixes #1143. (cherry picked from commit 53b1fef9c818f53fb04455b357ebbc6572987962)
* chore: Update NEWSv4.6.2Joel Rosdahl2022-08-221-1/+118
|
* chore: Update authorsJoel Rosdahl2022-08-222-0/+5
|
* fix: Add missing format argument to error messageJoel Rosdahl2022-08-221-1/+1
| | | | (cherry picked from commit 5210d5b4885ee9fd13a3f35eb568ca77d6e4d238)
* build: Fix MSVC build errorJoel Rosdahl2022-08-201-0/+1
|
* fix: Don't crash in race between file read and cleanupJoel Rosdahl2022-08-201-0/+3
| | | | | | | | As mentioned in discussion #1102. Regression in 02dac1f18084c0931aa6b8c1a07e9aedfadb5642. (cherry picked from commit 56aac268892491465b042db51a0a3884403b92e3)
* chore: Improve log message about too many raw file entriesJoel Rosdahl2022-08-201-2/+5
| | | | (cherry picked from commit 94508882ca6a9b715b02de5d9f2d14de69496af7)
* fix: Only enable inode cache if subsecond stat timestamps are availableJoel Rosdahl2022-08-201-1/+1
| | | | | | | If such fields are not available we risk false positive inode cache hits. (cherry picked from commit 879007ad0ced5373b314ac92590b665c072f814a)
* chore: Remove unused InodeCache::Key::sloppy_time_macros fieldJoel Rosdahl2022-08-201-1/+0
| | | | (cherry picked from commit 196b55fe0d0bce7268e6301328a2fa8629cfdbea)
* enhance: Support Stat::{atim,ctim,mtim} on macOSJoel Rosdahl2022-08-205-17/+28
| | | | (cherry picked from commit bcdaeb5c6082717bac984ab2ffafd0bdee552458)
* fix: Hash sanitizeblacklist delimiter correctlyJoel Rosdahl2022-08-201-1/+1
| | | | | | Regression in a502145296044ea32b24e329d75122e777c598e6. (cherry picked from commit df2602bb2de99f5d28cb05f6896920327314b783)
* test: Ignore clang warning from -fdebug-prefix-map testJoel Rosdahl2022-08-201-2/+2
| | | | (cherry picked from commit 5dd3696439d115870b4a73733ff910192550e56e)
* test: Only run -ftest-coverage + -fprofile-dir tests for GCCJoel Rosdahl2022-08-201-29/+29
| | | | | | | Clang complains with "warning: argument unused during compilation: '-fprofile-dir=dir'". (cherry picked from commit 9d899e98e643b08737c3ee1e70149ace461426d5)
* fix: Always rewrite dependency file if base_dir is usedJoel Rosdahl2022-08-204-16/+0
| | | | | | | | | | | | | | | | | | | [1] added the has_absolute_include_headers variable as a performance optimization for base_dir/CCACHE_BASEDIR so that the dependency file only has to be parsed/rewritten when necessary. This is based on the assumption that if no include file has an absolute path then no rewrite is needed, but apparently Clang can insert other paths into the dependency file as well, for instance the asan_blacklist.txt file when using -fsanitize=address. Fix this by simply always parsing the dependency file when base_dir is active. Fixes #1128. [1]: 60178b7a8eb8d03b364afb2fb8bd6753924cd9b7 (cherry picked from commit 1ee5365507ff3dd3d071f9ccd9380ad5c661ee12)
* fix: Handle --hash-file/--checksum-file error properlyJoel Rosdahl2022-08-201-9/+16
| | | | (cherry picked from commit 97076dcfe287413f2c48cf6c3bd03ddb6ee2e420)
* fix: Restore order of cpp and cppstderr sections in input hashJoel Rosdahl2022-08-201-3/+3
| | | | | | | This retains input hash compatibility with revisions before 64fc42ca2c5c9fe60ef4f1dc3882edb5f35579d6. (cherry picked from commit 11f3d650f94fce6766302642c74b92462c263bdd)
* fix: Work around Clang bug when outputting to full NFS diskJoel Rosdahl2022-08-207-112/+133
| | | | | | | | See <https://github.com/llvm/llvm-project/issues/56499>. Fixes #1115. (cherry picked from commit 64fc42ca2c5c9fe60ef4f1dc3882edb5f35579d6)
* test: Remove superfluous period from error messageJoel Rosdahl2022-08-201-1/+1
| | | | (cherry picked from commit c1ad0adf7db95c9a1982325074ebb1a79ba5cd1b)
* test: Fix printing of error messages with embedded newlinesJoel Rosdahl2022-08-201-4/+4
| | | | (cherry picked from commit 4b15d706691c2bef424888753dc98e4f5e1a3af3)
* fix: Log "bad output file" instead of "cache miss" on output file errorJoel Rosdahl2022-08-205-11/+45
| | | | (cherry picked from commit e08af162df0f921116c0883bcf4e43ca0ff078a3)
* fix: Avoid false positive cache hits for __asm__(".incbin" " \"file\"")Joel Rosdahl2022-08-202-7/+17
| | | | | | | | Regression in #983. Fixes #1120. (cherry picked from commit 7ee6030bc7b2e6ef321c01854f88ce0fd81c4513)
* fix: Avoid false success for -fcolor-diagnostics probe with GCCJoel Rosdahl2022-08-204-51/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ccache will produce a false hit in the following scenario, if "cc" is GCC without being a symlink to "gcc": 1. ccache cc -c example.c # adds a cache entry 2. ccache cc -c example.c -fcolor-diagnostics # unexpectedly succeeds (Most major Linux distributions install cc as a symlink to gcc, and then the problem doesn't show up since ccache then is able to guess that the compiler is GCC.) This bug was introduced by [1] which tried to make yet another tweak of the color diagnostics guessing/probing by no longer rejecting -fcolor-diagnostics for an unknown compiler, based on the assumption that the probing call (speculatively adding -fdiagnostics-color) is only made when we have guessed a GCC compiler. Unfortunately, this broke the fix in [2] when the compiler is unknown. All of this is inherently brittle and I don't see any good way to make it better with the current compiler guessing approach and adding options speculatively. The cure is to start doing proper compiler identification instead (#958). Until that is done, the only reasonable fix is to avoid doing anything related to color diagnostics flags when the compiler is unknown. This means that an unknown compiler from now on won't produce colors when used via ccache even if the compiler actually is GCC or Clang. [1]: 97a40af49f56e4be2db5e4318d8131e937bd5598 [2]: 61ce8c44c5b1da0be7a8d10c014f1a85b7967433 Closes #1116. (cherry picked from commit 96ec6c9d98b88f00e1a69bdd0214c237bc7ed04e)
* fix: Handle more cases of invalid secondary storage URLsJoel Rosdahl2022-08-202-6/+22
| | | | (cherry picked from commit b41ac6a7bc42f56161f929dd1f2c8fdeb22493ad)
* build: Fix FTBFS with not yet released GCC 13Joel Rosdahl2022-08-205-2/+8
| | | | | | | | Reference: https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes Fixes #1105. (cherry picked from commit 19ef6e267d38d4d8b3e11c915213472d5662d593)
* fix: Don't display max size in ccache -s if it's 0 (= unlimited)Joel Rosdahl2022-08-201-12/+18
| | | | (cherry picked from commit ab4074edef9481306e910b4e04d1a7625b8065a1)
* enhance: Fall back to utimes(2) if utimensat(2) is unavailableJoel Rosdahl2022-08-203-2/+16
| | | | (cherry picked from commit d67f26e5168dc6c6dbb12b6ef55407af215218e8)
* fix: Remove AsciiDoc markup from help text of --trim-dirJoel Rosdahl2022-08-201-2/+2
| | | | (cherry picked from commit 8d470e6cf79cb4c7117f84bc46756428fc70a209)
* fix: Use a cleanup stamp instead of directory timestamp for cleanupJoel Rosdahl2022-08-203-27/+21
| | | | | | | | | | | In order to know when to clean up the temporary directory, ccache checks mtime of $CCACHE_DIR and updates it to "now" on cleanup. This doesn't work well when the configuration file is modified often since that also updates the same mtime. Fix this by using a separate cleanup stamp file instead. (cherry picked from commit ec27506da3a03e0f5bf5f80494174fcdd9a43b0e)
* fix: Clean up temporary dir if it's left the defaultJoel Rosdahl2022-08-203-6/+6
| | | | | | | | | | | Cleanup of the temporary directory is done if it is $CCACHE_DIR/tmp, which used to be the default until [1] where the default was changed to /run/user/$UID/ccache-tmp. Improve this so that cleanup happens if the temporary directory is equal to the default regardless of the default. [1]: 213d9883a0c3944749f8512eeb784d8572ad8d91 (cherry picked from commit ce6b0c3dbdf1f84ab625d4c86770297f93b87032)
* docs: Mention that mtime is used for LRU cleanupJoel Rosdahl2022-08-201-0/+4
| | | | | | Closes #1095. (cherry picked from commit b1c37b330c24fd2b9f3f41762a755a51806fbaaf)
* chore: Fix typo in comment about MSVC object filesJoel Rosdahl2022-08-201-1/+1
| | | | (cherry picked from commit 35e181c9c0e1e16fe7d7c741bd18f215e7cdc6d0)
* test: Avoid warning when running inode_cache in isolationJoel Rosdahl2022-08-201-0/+1
| | | | (cherry picked from commit d40452090c36ee207eb3b5043d921203353a25f8)
* fix: Add and use Util::{get,set}_umask functionsJoel Rosdahl2022-08-205-7/+22
| | | | | | | | | | | | | | | Using mode_t mask = umask(0); umask(mask); to retrieve the current umask isn't thread-safe. This messed up file permissions when recompressing the cache. Fix this by caching the last set value and always using Util::{get,set}_umask to get and set the umask. (cherry picked from commit f8f1c35344e37bc52c9fe71daebb5b378bd353f3)
* fix: Retain mtime/atime for recompressed filesJoel Rosdahl2022-08-201-3/+5
| | | | (cherry picked from commit c57929acd676c577e1abae8aae6467c37ecd7b4b)
* enhance: Add util::set_timestamps function for setting mtime/atimeJoel Rosdahl2022-08-209-28/+54
| | | | (cherry picked from commit 176bdc0016b9f0bdbf23b111f135e3ff1931fdf7)
* fix: Use correct umask when populating primary cache from secondaryJoel Rosdahl2022-08-203-17/+12
| | | | | | | | | | | | | | | Util::get_umask retrieves the process's umask and caches it to avoid some system calls. This doesn't interact well now when using UmaskScope to change umask temporarily since Util::get_umask then only sometimes returns the correct value. This leads to the incorrect umask being used when writing cache entries to the primary storage for secondary storage hits. Fix this by not caching the umask system call. Closes #1087. (cherry picked from commit 6484cdfa0f22214d91cd61562f48d4d9060d2533)
* fix: Create temporary file with cpp extension instead of hard linkingJoel Rosdahl2022-08-205-28/+39
| | | | | | | | | | | | | | | | | [1] added a suitable file extension to the temporary file used for capturing the preprocessed output by creating a hard link. This fails when the temporary directory is on a file system that doesn't support hard links. Fix this by making it possible to pass a suffix to TemporaryFile and passing the proper cpp suffix for the tmp stdout file instead of creating a hard link as an alias. [1]: 4da9f2b474b7ee39cd54ab4261f90936f3c944ec Closes #1079. (cherry picked from commit e55d7e6d97e65580e21389b1b5b69d35421720be)
* fix: Fix build for MSVC (#1078)Florin T2022-08-201-1/+5
| | | | | | For Windows the order of the includes is important in wincompat.hpp. (cherry picked from commit 375d566635a934ba22287c391f39e58e85aa8567)
* fix: Fall back to compiler when producing assembler listing fileJoel Rosdahl2022-08-202-0/+31
| | | | | | | | | Ccache currently doesn't store the listing produced by -Wa,...=file, so fall back to running the real compiler. See #1083. (cherry picked from commit b36a81893c6f2cd20087815df2ddeb56dd547813)
* chore: Add debug log for -P + other preprocessor optionJoel Rosdahl2022-08-201-1/+2
| | | | (cherry picked from commit 1ae1ae2bf9540fd0f623e6c61f8fe56ca3b572f5)
* fix(win32execute): Handle space in paths when using response file (#1080)Sergey Semushin2022-08-201-1/+1
| | | | (cherry picked from commit bb024c69353cd34145c72d3a64fc94604e0407ce)
* test: Fix test failure when compiler is masquerading old ccacheJoel Rosdahl2022-08-201-2/+2
| | | | (cherry picked from commit 0d60322086c0030bb1af72891d48e83be5c295a2)
* fix: Fix crash with empty include filename in preprocessor output (#1075)olegsidorkin2022-05-161-0/+4
|
* chore: Update NEWSv4.6.1Joel Rosdahl2022-05-151-0/+133
|
* chore: Update authorsJoel Rosdahl2022-05-141-0/+2
|