]> git.ipfire.org Git - thirdparty/ccache.git/log
thirdparty/ccache.git
5 years agoRevert "Only pass implicit -MQ to preprocessor if needed"
Joel Rosdahl [Wed, 1 Jan 2020 20:59:29 +0000 (21:59 +0100)] 
Revert "Only pass implicit -MQ to preprocessor if needed"

This reverts commit 19c3729d30640fc2c78242cb46136e619fdbd802 and also
removes the incorrect and superfluous condition that the fix fixes.

The reason for reverting is that the change introduced a nasty bug: the
dependency file will get an incorrect object file location if 1) build
directory != source directory and 2) -MF is not specified explictly by
the user.

Details: The dependency file is created by the preprocessor pass which
does not have access to the final output file name, so the preprocessor
uses the default object location derived from the source file location
instead.

Note that this partly reverts a compatibility improvement for EDG-based
compilers (see issue #460).

It should be possible to pass the dependency arguments to the compiler
instead of the preprocessor to make -MD/-MMD without -MQ work, but
that’s too risky to be done as a bug fix.

Fixes #499.

5 years agoAdd “--nocpp2” option to misc/performance
Joel Rosdahl [Wed, 1 Jan 2020 20:49:11 +0000 (21:49 +0100)] 
Add “--nocpp2” option to misc/performance

5 years agoTest .incbin detection for assembler compilation
Joel Rosdahl [Sun, 29 Dec 2019 19:06:32 +0000 (20:06 +0100)] 
Test .incbin detection for assembler compilation

5 years agoRemove the unify mode
Joel Rosdahl [Sun, 29 Dec 2019 18:21:39 +0000 (19:21 +0100)] 
Remove the unify mode

The unify mode has not received enough attention and has at least these
bugs:

1. The direct mode doesn’t work if the unify mode is enabled. This is
   because the unify mode doesn’t call into process_preprocessed_file
   which stores the paths and hashes of included files needed by the
   direct mode.
2. The .incbin directive detection has no effect when using the unify
   mode. This is again because the unify mode doesn’t use
   process_preprocessed_file which is where the .incbin detection takes
   place.
3. The unifier’s tokenizer doesn’t understand C++11 raw string literals.
4. The unifier ignores comments, but comments may have semantic meaning
   to modern compilers, e.g. “fall through” comments.

Bugs 3 and 4 are fixable by improving the unifier’s tokenization
algorithm, but since it’s a bit tricky it likely won’t be worth the
effort, especially not as a bug fix.

Bugs 1 and 2 are also fixable by unifying the two code paths, but that’s
a non-trivial effort.

In addition to the bugs, I believe that the usefullness of the unify
mode is low:

* It’s only applicable when not using -g.
* It won't be enabled for C++ unless somebody fixes bug 3.
* It can make line numbers in warning messages and __LINE__ expansions
  incorrect.
* Since comments should not be ignored, the unify mode can only make a
  difference for some types of whitespace changes, like adding or
  removing blank lines or changing a+b to a + b. (a + b is already
  normalized to a + b by the preprocessor.)

Therefore I’ll just remove the unify mode to fix the bugs.

Fixes #497.

5 years agoUpdate .mailmap
Joel Rosdahl [Mon, 2 Dec 2019 21:00:06 +0000 (22:00 +0100)] 
Update .mailmap

5 years agoImprove comments related to save_timestamp
Joel Rosdahl [Mon, 2 Dec 2019 20:58:56 +0000 (21:58 +0100)] 
Improve comments related to save_timestamp

5 years agoStore mtime/ctime as -1 if sloppy_file_stat is not set (#495)
MizuhaHimuraki [Mon, 2 Dec 2019 20:54:22 +0000 (04:54 +0800)] 
Store mtime/ctime as -1 if sloppy_file_stat is not set (#495)

As discussed in #493.

5 years agoPrepare for v3.7.6 v3.7.6
Joel Rosdahl [Sun, 17 Nov 2019 19:09:58 +0000 (20:09 +0100)] 
Prepare for v3.7.6

5 years agoUpdate NEWS
Joel Rosdahl [Sat, 16 Nov 2019 22:39:58 +0000 (23:39 +0100)] 
Update NEWS

5 years agoAlways include input file path in direct mode hash
Joel Rosdahl [Sat, 16 Nov 2019 21:59:33 +0000 (22:59 +0100)] 
Always include input file path in direct mode hash

The “file_macro sloppiness” mode is a way of opting out of inclusion of
the input file path in the direct mode hash. This can produce a false
cache hit in the following scenario:

- a/r.h exists.
- a/x.c has #include "r.h".
- b/x.c is identical to a/x.c.
- Compiling a/x.c records a/r.h in the manifest.
- Compiling b/x.c results in a false cache hit since a/x.c and b/x.c
  share manifests and a/r.h exists.

Therefore, ditch the file_macro sloppiness mode so that the input file
path is always included in the direct mode hash.

This bug has existed ever since the file_macro sloppiness was introduced
in eb5d9bd3beb5 (ccache 3.0). It has remained undetected since
compilations tend to use .d files and ccache before 3.7.5 added an
implicit “-MQ <output_file_path>” argument, thus in practice including
the output file path in the hash and therefore making manifests unique
when the object file path mirrors the source file path. However, ccache
3.7.5 no longer adds the implicit -MQ option, thus exposing the bug.

Fixes #489.

5 years agoIgnore unknown sloppiness values in configuration files
Joel Rosdahl [Sat, 16 Nov 2019 21:51:54 +0000 (22:51 +0100)] 
Ignore unknown sloppiness values in configuration files

Similar to 22db9ed893e9: This way legacy ccache versions can still work
with modern ccache configuration keys in the configuration files.

5 years agoHandle properly color diagnostics also in depend mode (#484)
Luboš Luňák [Thu, 14 Nov 2019 19:23:03 +0000 (20:23 +0100)] 
Handle properly color diagnostics also in depend mode (#484)

Compiler invocation in the depend mode uses the original arguments,
which means the added -fcolor-diagnostics (or -fdiagnostics-color)
was dropped.

(cherry picked from commit 061e57ced8abfd31d7eb41924d64e0765e806d89)

5 years agoFormat code with uncrustify
Joel Rosdahl [Sun, 10 Nov 2019 20:35:11 +0000 (21:35 +0100)] 
Format code with uncrustify

5 years agoCorrect "-MJ" bail out, identify both "-MJ file" and "-MJfile" (#486)
Thomas Otto [Sun, 10 Nov 2019 20:32:59 +0000 (21:32 +0100)] 
Correct "-MJ" bail out, identify both "-MJ file" and "-MJfile" (#486)

Also added test to detect the invalid case TOO_HARD | TAKES_CONCAT_ARG.

5 years agostats: Fix statistics update with full filesystem
Russell King [Thu, 31 Oct 2019 16:30:22 +0000 (16:30 +0000)] 
stats: Fix statistics update with full filesystem

The statistics file update does not check for write errors correctly
as stdio files are normally buffered.  This means that data can be
written to the stdio buffer but not written out until fclose().
Hence, it is imperative that the fclose() return value is also
checked.

If either fprintf() or fclose() fail, clean up the temporary file,
rather than littering the filesystem with needless temporary files.

Signed-off-by: Russell King <rmk@armlinux.org.uk>
5 years agoPrepare for v3.7.5 v3.7.5
Joel Rosdahl [Tue, 22 Oct 2019 18:48:58 +0000 (20:48 +0200)] 
Prepare for v3.7.5

5 years agoUpdate NEWS
Joel Rosdahl [Tue, 22 Oct 2019 18:16:29 +0000 (20:16 +0200)] 
Update NEWS

5 years agoFix spelling
Joel Rosdahl [Tue, 22 Oct 2019 18:16:14 +0000 (20:16 +0200)] 
Fix spelling

5 years agoFix possible NULL pointer dereference (#433)
Igor Pylypiv [Mon, 10 Jun 2019 20:52:35 +0000 (13:52 -0700)] 
Fix possible NULL pointer dereference (#433)

cppcheck:
  [src/manifest.c:270] -> [src/manifest.c:269]: (warning)
  Either the condition '!errmsg' is redundant or there is possible null pointer
  dereference: errmsg.

(cherry picked from commit 359be01b408ba4c60b968575ee6382ec5483f69f)

5 years agoPlease Clang’s -Wmissing-variable-declarations
Joel Rosdahl [Tue, 22 Oct 2019 18:29:19 +0000 (20:29 +0200)] 
Please Clang’s -Wmissing-variable-declarations

5 years agoIncrease interval for cleaning up $CCACHE_DIR/tmp to 2 days
Joel Rosdahl [Tue, 22 Oct 2019 18:04:01 +0000 (20:04 +0200)] 
Increase interval for cleaning up $CCACHE_DIR/tmp to 2 days

This will reduce problems when adjusting system time; see #480.

5 years agoDon’t fail fatally if temporary cpp_stderr file is missing
Joel Rosdahl [Mon, 21 Oct 2019 18:06:22 +0000 (20:06 +0200)] 
Don’t fail fatally if temporary cpp_stderr file is missing

If the temporary cpp_stderr file is missing when the compilation command
has finished then either some user removed it or ccache removed it in
clean_up_internal_tempdir (since the compilation took more than hour or
the system clock was adjusted?). In either case, let’s just fall back to
running the real compiler instead of failing fatally.

Fixes #480 and #154.

5 years agoFix warning during configure in out of tree build (#479)
Erik Johansson [Fri, 18 Oct 2019 17:25:44 +0000 (19:25 +0200)] 
Fix warning during configure in out of tree build (#479)

../configure: line 2250: src/version.cpp: No such file or directory

5 years agoAdd -MQ to compilation flags to make dependency files work properly
Joel Rosdahl [Sun, 13 Oct 2019 19:58:31 +0000 (21:58 +0200)] 
Add -MQ to compilation flags to make dependency files work properly

Looks like ccache’s own header dependencies have been broken since
4aa357782e48 and nobody noticed.

5 years agoImprove test case order
Joel Rosdahl [Thu, 3 Oct 2019 18:58:34 +0000 (20:58 +0200)] 
Improve test case order

5 years agoAdd support for -MF=arg as understood by EDG-based compilers
Joel Rosdahl [Thu, 3 Oct 2019 18:40:06 +0000 (20:40 +0200)] 
Add support for -MF=arg as understood by  EDG-based compilers

Closes #460.

5 years agoOnly pass implicit -MQ to preprocessor if needed
Joel Rosdahl [Thu, 3 Oct 2019 18:21:54 +0000 (20:21 +0200)] 
Only pass implicit -MQ to preprocessor if needed

This is a bug fix of 76a9959f3d3e.

5 years agoUpdate NEWS
Joel Rosdahl [Thu, 3 Oct 2019 18:15:52 +0000 (20:15 +0200)] 
Update NEWS

5 years agoDon’t crash if localtime returns null pointer in localtime_r replacement
Joel Rosdahl [Sun, 22 Sep 2019 17:46:42 +0000 (19:46 +0200)] 
Don’t crash if localtime returns null pointer in localtime_r replacement

This seems to happen in some unknown Windows environment, see #450.

Fixes #450.

5 years agoInclude compiler-only arguments in the hash
Joel Rosdahl [Tue, 17 Sep 2019 20:37:57 +0000 (22:37 +0200)] 
Include compiler-only arguments in the hash

After 5d8585b5 (#312), arguments that are not considered affecting the
preprocessor output won’t be passed to the preprocessor. -Werror and
-Wno-error are also not passed to the preprocessor so that options not
properly marked as “compiler only” will only trigger warnings, not
errors. This was a workaround for Clang complaining about unused
arguments in the preprocessor step performed by ccache.

However, it also introduced a regression: -Werror and the other options
were excluded from the hash as well. This means that

  cc -c file_with_warnings.c

would be cached by ccache, including the warning message. A later

  cc -Werror -c file_with_warnings.c

call would then be a cache hit, resulting in a compilation warning
instead of an error.

This commit fixes the problem by also including the compiler-only
arguments in the hash.

5 years agoOnly enable more warnings in dev mode when requested
Joel Rosdahl [Sun, 15 Sep 2019 19:32:50 +0000 (21:32 +0200)] 
Only enable more warnings in dev mode when requested

21ded3ae enabled “more warnings” in dev mode unconditionally, but that
doesn’t play well in dev builds with a Clang version older than the one
used in Travis-CI since the “-Wno-foo” options may be unknown. Instead
of doing feature tests for those options, just enable “more warnings”
when --enable-more-warnings is specified and specify it for Travis-CI
builds.

5 years agoPrepare for v3.7.4 v3.7.4
Joel Rosdahl [Thu, 12 Sep 2019 19:14:09 +0000 (21:14 +0200)] 
Prepare for v3.7.4

5 years agoUpdate NEWS
Joel Rosdahl [Thu, 12 Sep 2019 19:14:06 +0000 (21:14 +0200)] 
Update NEWS

5 years agoSupport GCC 9’s -gz=[type] option
Joel Rosdahl [Thu, 12 Sep 2019 18:50:46 +0000 (20:50 +0200)] 
Support GCC 9’s -gz=[type] option

-gz[=type] neither disables nor enables generation of debug info, so
don’t enable the fallback behavior of hashing the current directory when
seeing -gz[=type] alone.

Closes #464.

5 years agoWin32: make_relative_path also accept /c/users (#455)
Cristian Adam [Wed, 28 Aug 2019 17:07:21 +0000 (19:07 +0200)] 
Win32: make_relative_path also accept /c/users (#455)

Patch copied from jd-gascuel@f3b85c9

(cherry picked from commit 1fa9f0c8130177578020cdb89b9c93792f42400e)

5 years agoPrepare for v3.7.3 v3.7.3
Joel Rosdahl [Sat, 17 Aug 2019 20:07:43 +0000 (22:07 +0200)] 
Prepare for v3.7.3

5 years agoUpdate NEWS
Joel Rosdahl [Sat, 17 Aug 2019 19:59:53 +0000 (21:59 +0200)] 
Update NEWS

5 years agoFix typo in NEWS
Joel Rosdahl [Fri, 16 Aug 2019 17:27:20 +0000 (19:27 +0200)] 
Fix typo in NEWS

5 years agoDon’t pass -Wno-error to the preprocessor
Joel Rosdahl [Thu, 15 Aug 2019 20:20:38 +0000 (22:20 +0200)] 
Don’t pass -Wno-error to the preprocessor

This is done to keep the argument order between -Werror and -Wno-error.

Fixes #451.

5 years agoRefer to autogen.sh correctly in autogen.sh
Joel Rosdahl [Fri, 2 Aug 2019 21:24:27 +0000 (23:24 +0200)] 
Refer to autogen.sh correctly in autogen.sh

Closes #449.

(cherry picked from commit 71446a8651b671004cc6a57c61f9f73f0a3d0375)

5 years agoFix CCACHE_MAXSIZE with filesystem compression (#444)
Ivan Volnov [Sun, 21 Jul 2019 20:57:51 +0000 (04:57 +0800)] 
Fix CCACHE_MAXSIZE with filesystem compression (#444)

(cherry picked from commit 14d4371b50206fe9dfba45222b63a3d01605e16c)

6 years agoPrepare for v3.7.2 v3.7.2
Joel Rosdahl [Fri, 19 Jul 2019 07:58:36 +0000 (09:58 +0200)] 
Prepare for v3.7.2

6 years agoUpdate NEWS
Joel Rosdahl [Fri, 19 Jul 2019 07:35:07 +0000 (09:35 +0200)] 
Update NEWS

6 years agoDon’t pass -Werror and compilation-only options to the preprocessor
Joel Rosdahl [Fri, 19 Jul 2019 07:22:04 +0000 (09:22 +0200)] 
Don’t pass -Werror and compilation-only options to the preprocessor

Clang emits warnings when it sees unused options, so when ccache runs
the Clang preprocessor separately, options that are not used by the
preprocessor will produce warnings. This means that the user may get
warnings which would not be present when not using ccache. And if
-Werror is present then the preprocessing step fails, which needless to
say is not optimal.

To work around this:

* Options known to have the above mentioned problem are not passed to
  the preprocessor.
* In addition, -Werror is also not passed to the preprocessor so that
  options not properly marked as “compiler only” will only trigger
  warnings, not errors.

Fixes #312.

6 years agoRename stripped_args to common_args
Joel Rosdahl [Sat, 11 May 2019 20:19:45 +0000 (22:19 +0200)] 
Rename stripped_args to common_args

6 years agoDon’t build tar.bz2 release archive
Joel Rosdahl [Wed, 17 Jul 2019 18:38:30 +0000 (20:38 +0200)] 
Don’t build tar.bz2 release archive

bz2 seems more or less obsolete since xz compresses better (and
decompresses faster), and gz is more ubiquitous.

6 years agoAvoid letting “-gdwarf*” force “run_second_cpp = true”
Joel Rosdahl [Tue, 2 Jul 2019 12:26:39 +0000 (14:26 +0200)] 
Avoid letting “-gdwarf*” force “run_second_cpp = true”

Fixes #394.

6 years agoDon’t enable unit test verbosity in Travis
Joel Rosdahl [Sat, 29 Jun 2019 18:38:56 +0000 (20:38 +0200)] 
Don’t enable unit test verbosity in Travis

It’s way too spammy.

6 years agoVerify value in “ccache -o key=value”
Joel Rosdahl [Mon, 17 Jun 2019 20:29:12 +0000 (22:29 +0200)] 
Verify value in “ccache -o key=value”

Based on a suggestion by Henri Houder.

6 years agoconst-ify parameters to confitem verifier/formatter
Joel Rosdahl [Mon, 17 Jun 2019 20:28:51 +0000 (22:28 +0200)] 
const-ify parameters to confitem verifier/formatter

6 years agoImprove solution to #405
Joel Rosdahl [Sun, 26 May 2019 12:02:02 +0000 (14:02 +0200)] 
Improve solution to #405

Instead of changing the global stats_file value temporarily in
update_manifest, pass which file to update explicitly to
stats_update_size.

6 years agoRemove .xml files in the doc directory on “make distclean”
Joel Rosdahl [Thu, 23 May 2019 18:46:21 +0000 (20:46 +0200)] 
Remove .xml files in the doc directory on “make distclean”

6 years agoMention xsltproc in INSTALL.md
Joel Rosdahl [Tue, 21 May 2019 19:52:27 +0000 (21:52 +0200)] 
Mention xsltproc in INSTALL.md

Related to #425.

6 years agoTweak formatting of manual text and code comments
Joel Rosdahl [Mon, 20 May 2019 19:25:27 +0000 (21:25 +0200)] 
Tweak formatting of manual text and code comments

6 years agoFix PCH detection in depend mode (+test improvements) (#427)
Luboš Luňák [Mon, 20 May 2019 19:18:16 +0000 (21:18 +0200)] 
Fix PCH detection in depend mode (+test improvements) (#427)

* do not refer to Clang's PTH in tests

The PTH feature has been removed (https://reviews.llvm.org/D54547)
and according to the commit it has never really been used. Maybe this
made sense somewhen in the past, but now those .pth files must be PCHs
internally. This commit actually just changes the .pth extensions
to .pch to avoid confusion, technically nothing should change
except for filenames.

* try to share PCH tests between GCC and Clang

Clang is supposed to be a drop-in for GCC, so in general it should
be able to handle everything GCC can. That's not completely true
in practice, there are differences, but it doesn't make sense
to completely duplicate a testcase just because there are some
differences. So start creating a shared common base for the PCH
tests and do separately only tests that act differently.

* more sharing of PCH tests between GCC and Clang

There's e.g. no need to do all kinds of complex tests with both
.gch and .pch with Clang, except for checking that Clang finds
one of them if none is specified explicitly.

* log also when pch usage is detect from pragma pch_preprocess

* try harder to verify in tests that ccache detects PCH changes

Some of the tests did that, e.g. those 'file changed', but e.g. the cached
.gch creation did not. So try to intentionally change the .gch/.h and test
that it leads to a cache miss. Otherwise there might be a hit simply
because ccache failed to detect PCH usage and ignores the .gch completely.

* clean up #include vs -fpch-preprocess in pch tests

As the manpage says, -fpch-preprocess is needed only with the #include
form, otherwise it's pointless.

* do not mention sloppiness in pch tests, only no sloppiness

Since sloppiness is normally required, so no point in stating the obvious.

* test also -include-pch with clang

* hash also pch introduced only using -include

GCC does not output the pch in the .d dependencies file, so without
this there would be false cache hits.

* be consistent about sloppiness in pch tests

create pch -> pch_defines
use pch -> time_macros

* test CCACHE_PCH_EXTSUM more thoroughly and also with -include

* pch test for .gch file being in an extra directory

* doc corrections for how to use PCH with ccache

- ccache will fail to properly detect that -include a.h means using
  a.h.gch if it requires using path from -I (they are not searched)
- -fpch-preprocess does nothing with Clang, it doesn't output
  pragma GCC pch_preprocess and so #include form for PCHs doesn't work

* explain better problems of -MD/-MMD in depend mode

6 years agoHint about not running autogen.sh when building from release archive
Joel Rosdahl [Sat, 11 May 2019 15:24:11 +0000 (17:24 +0200)] 
Hint about not running autogen.sh when building from release archive

Related to #418.

6 years agoClean up detection of CI environment
Joel Rosdahl [Sat, 11 May 2019 15:00:21 +0000 (17:00 +0200)] 
Clean up detection of CI environment

“RUN_FROM_BUILD_FARM” was set by the old Samba build farm, so switch to
checking “TRAVIS” instead. Also, keep running in dev mode in Travis.

6 years agoclang's -ftime-trace is too hard (#424)
Luboš Luňák [Sat, 11 May 2019 14:54:00 +0000 (16:54 +0200)] 
clang's -ftime-trace is too hard (#424)

It produces extra .json file with timing information about the compilation.

6 years agoHandle unknown manifest version gracefully in --dump-manifest
Joel Rosdahl [Sun, 5 May 2019 19:54:27 +0000 (21:54 +0200)] 
Handle unknown manifest version gracefully in --dump-manifest

Previously “ccache --dump-manifest file” would crash with an assert when
the file did not have the expected version.

6 years agoFix make check with "funny" locales (#420)
Luboš Luňák [Sat, 11 May 2019 14:38:33 +0000 (16:38 +0200)] 
Fix make check with "funny" locales (#420)

'ch' in cs_CZ locale is technically just one character, so directory
name 'ccache' fails the test

6 years agoTweak comment
Joel Rosdahl [Thu, 2 May 2019 19:29:06 +0000 (21:29 +0200)] 
Tweak comment

6 years agoUpdate the correct stats file for manifest (#405)
Anders Björklund [Thu, 2 May 2019 19:28:38 +0000 (21:28 +0200)] 
Update the correct stats file for manifest (#405)

There are global variables used for updating stats,
and those were wrong for the manifest file update.

So make sure to reset those variables, before adding
the manifest (this means flushing the pending updates)

6 years agoFix source comment and documentation typos (#403)
luzpaz [Wed, 1 May 2019 19:10:24 +0000 (15:10 -0400)] 
Fix source comment and documentation typos (#403)

Found via `codespell -q 3 -L uint,thru -S ./src/zlib`

6 years agoPrepare for v3.7.1 v3.7.1
Joel Rosdahl [Wed, 1 May 2019 14:27:59 +0000 (16:27 +0200)] 
Prepare for v3.7.1

6 years agoPrepare for v3.7.1
Joel Rosdahl [Wed, 1 May 2019 14:27:39 +0000 (16:27 +0200)] 
Prepare for v3.7.1

6 years agoAvoid -Wextra-semi-stmt warnings from Clang
Joel Rosdahl [Wed, 1 May 2019 14:20:16 +0000 (16:20 +0200)] 
Avoid -Wextra-semi-stmt warnings from Clang

6 years agoUpdate NEWS
Joel Rosdahl [Wed, 1 May 2019 14:10:31 +0000 (16:10 +0200)] 
Update NEWS

6 years agoFix usage of ferror after fclose
Joel Rosdahl [Wed, 1 May 2019 14:10:18 +0000 (16:10 +0200)] 
Fix usage of ferror after fclose

6 years agoImprove fix in #400 to handle more cases
Joel Rosdahl [Wed, 1 May 2019 12:51:45 +0000 (14:51 +0200)] 
Improve fix in #400 to handle more cases

The dependency file name can come from e.g. DEPENDENCIES_OUTPUT as well,
so hash information about a /dev/null .d file after the argument
processing loop instead.

6 years agoTweak code style
Joel Rosdahl [Wed, 1 May 2019 12:25:16 +0000 (14:25 +0200)] 
Tweak code style

6 years agoHash information to make results with -MF /dev/null unique (#400)
Anders F Björklund [Mon, 29 Apr 2019 18:01:38 +0000 (20:01 +0200)] 
Hash information to make results with -MF /dev/null unique (#400)

If we first run with -MF /dev/null, then we will get a
"cache file missing" error on the next run - avoid that.

Make sure to cache the special /dev/null value, so that
it differs from the normal (ignored) dep file name...

6 years agoRevert "Bail out on “-MF /dev/null”"
Joel Rosdahl [Wed, 1 May 2019 12:21:41 +0000 (14:21 +0200)] 
Revert "Bail out on “-MF /dev/null”"

This reverts commit 253301e7ac56a9d2bed1f03a91ba73be102a0d42.

6 years agoBail out on “-MF /dev/null”
Joel Rosdahl [Wed, 1 May 2019 11:58:18 +0000 (13:58 +0200)] 
Bail out on “-MF /dev/null”

This is an alternative fix for #397, based on the observation/assumption
that using “-MF /dev/null” is only ever used as part of a compiler probe
call in combination with “-c /dev/null -o /dev/null”, so there is little
reason to cache the result. The advantage of just bailing out is to
reduce the number of special cases we have to handle.

6 years agoFix “Help wanted”/”Good first issues” links
Joel Rosdahl [Mon, 29 Apr 2019 19:03:13 +0000 (21:03 +0200)] 
Fix “Help wanted”/”Good first issues” links

6 years agoSupport using -MF /dev/null argument (#398)
Anders Björklund [Sun, 28 Apr 2019 20:50:03 +0000 (22:50 +0200)] 
Support using -MF /dev/null argument (#398)

This is sometimes used when detecting capabilities.

6 years agoSort entries in LICENSE.adoc
Joel Rosdahl [Sun, 28 Apr 2019 20:09:20 +0000 (22:09 +0200)] 
Sort entries in LICENSE.adoc

6 years agoMake uncrustify ignore newlines for enums
Joel Rosdahl [Sun, 28 Apr 2019 11:57:54 +0000 (13:57 +0200)] 
Make uncrustify ignore newlines for enums

Uncrustify doesn’t properly understand enums as return values and
ignoring newlines is an easy workaround.

6 years agoTweak typedef of the stat format function
Joel Rosdahl [Sun, 28 Apr 2019 11:56:35 +0000 (13:56 +0200)] 
Tweak typedef of the stat format function

Typedef-ing the function as a pointer type works better with uncrustify.

6 years agoCalculate length correctly in win32argvtos
Joel Rosdahl [Thu, 25 Apr 2019 19:21:53 +0000 (21:21 +0200)] 
Calculate length correctly in win32argvtos

6 years agoFix NULL argument in profile directory trace (#395)
Loïc Yhuel [Thu, 25 Apr 2019 19:19:10 +0000 (21:19 +0200)] 
Fix NULL argument in profile directory trace (#395)

With -fprofile-*=path, we currently print :
"Setting profile directory to (null)".

This fixes the build with gcc 9, which failed with :
error: ‘%s’ directive argument is null [-Werror=format-overflow=]

6 years agoFix memory and temporary file leak
Joel Rosdahl [Thu, 25 Apr 2019 18:37:37 +0000 (20:37 +0200)] 
Fix memory and temporary file leak

6 years agoFix code style
Joel Rosdahl [Thu, 25 Apr 2019 18:25:57 +0000 (20:25 +0200)] 
Fix code style

6 years agoHandle @file syntax on Windows correctly (#392)
Mike Blumenkrantz [Thu, 25 Apr 2019 18:24:01 +0000 (14:24 -0400)] 
Handle @file syntax on Windows correctly (#392)

* add length return to win32argvtos()

this is useful for determining the length of the generated argument string

* correctly handle @file syntax on Windows

the @file syntax means that the process reads command arguments from the
specified file. this is commonly used in order to shorten commands which
would otherwise be longer than the maximum length limit: many build systems
do this in all cases to avoid hitting this limit.

when a command exceeds 8192 characters on on Windows, ccache now writes
the parsed/modified arguments to a tmpfile and then runs the command using
that tmpfile with @tmpfile in order to preserve this mechanism and avoid hitting
the length limit

fixes #95

6 years agoPrepare for v3.7 v3.7
Joel Rosdahl [Tue, 23 Apr 2019 18:40:15 +0000 (20:40 +0200)] 
Prepare for v3.7

6 years agoDon’t include email addresses in authors list
Joel Rosdahl [Mon, 22 Apr 2019 19:19:36 +0000 (21:19 +0200)] 
Don’t include email addresses in authors list

Not all users have real email addresses anyway, and I don’t see any real
use for maintaining a “correct” list of addresses.

6 years agoFix Clang analyzer warning about uninitialized value
Joel Rosdahl [Mon, 22 Apr 2019 18:56:41 +0000 (20:56 +0200)] 
Fix Clang analyzer warning about uninitialized value

6 years agoUpdate NEWS
Joel Rosdahl [Mon, 22 Apr 2019 18:25:33 +0000 (20:25 +0200)] 
Update NEWS

6 years agoThe clang --analyze option is too hard (for now) (#389)
Anders Björklund [Mon, 22 Apr 2019 17:57:04 +0000 (19:57 +0200)] 
The clang --analyze option is too hard (for now) (#389)

The scan-build wrapper seems to use -analyze.

6 years agoUpgrade minitrace to latest master (#387)
Anders Björklund [Mon, 22 Apr 2019 15:19:27 +0000 (17:19 +0200)] 
Upgrade minitrace to latest master (#387)

6 years agoRename perf/perf.py to misc/performance
Joel Rosdahl [Mon, 22 Apr 2019 14:16:01 +0000 (16:16 +0200)] 
Rename perf/perf.py to misc/performance

No need for it to occupy a directory of its own.

6 years agoConvert Python scripts to Python 3 and Blacken them
Joel Rosdahl [Mon, 22 Apr 2019 14:13:13 +0000 (16:13 +0200)] 
Convert Python scripts to Python 3 and Blacken them

Because 2019.

6 years agoImprove docs for (and name of) utility scripts for tracing
Joel Rosdahl [Mon, 22 Apr 2019 13:47:18 +0000 (15:47 +0200)] 
Improve docs for (and name of) utility scripts for tracing

6 years agoSimplify trace_stop signature
Joel Rosdahl [Mon, 22 Apr 2019 13:45:34 +0000 (15:45 +0200)] 
Simplify trace_stop signature

6 years agoFix minitrace.c compilation error with GCC 7.3
Joel Rosdahl [Mon, 22 Apr 2019 13:22:07 +0000 (15:22 +0200)] 
Fix minitrace.c compilation error with GCC 7.3

The error/warning looks like this:

src/minitrace.c: In function ‘mtr_flush’:
src/minitrace.c:256:54: error: ‘%.*s’ directive output may be truncated writing up to 700 bytes into a region of size 252 [-Werror=format-truncation=]
     snprintf(arg_buf, ARRAY_SIZE(arg_buf), "\"%s\":\"%.*s\"", raw->arg_name, 700, raw->a_str);
                                                      ^~~~
In file included from /usr/include/stdio.h:862:0,
                 from src/minitrace.c:9:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note: ‘__builtin___snprintf_chk’ output 6 or more bytes (assuming 706) into a destination of size 256
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

6 years agoUpdate NEWS
Joel Rosdahl [Mon, 22 Apr 2019 13:17:22 +0000 (15:17 +0200)] 
Update NEWS

6 years agoRevert "Support for Fortran 77"
Joel Rosdahl [Mon, 22 Apr 2019 13:15:23 +0000 (15:15 +0200)] 
Revert "Support for Fortran 77"

This reverts commit c0875cf2dae56f66076ee01e0ca6e723ba999199.

Fixes #342.

6 years agoFix bugs in the newly introduced tracing mode (#386)
Anders Björklund [Mon, 22 Apr 2019 13:09:18 +0000 (15:09 +0200)] 
Fix bugs in the newly introduced tracing mode (#386)

* The tracefile variable is not used anymore

This caused trace files to be left in /tmp

* Fix crash in tracing mode, caused by logging

Unfortunately cc_log() requires conf to work

6 years agoUpdate NEWS
Joel Rosdahl [Sun, 21 Apr 2019 20:14:16 +0000 (22:14 +0200)] 
Update NEWS

6 years agoTweak manuals and code related to tracing
Joel Rosdahl [Sun, 21 Apr 2019 20:12:06 +0000 (22:12 +0200)] 
Tweak manuals and code related to tracing

6 years agoAdd optional support for microsecond tracing (#280)
Anders Björklund [Sun, 21 Apr 2019 19:59:03 +0000 (21:59 +0200)] 
Add optional support for microsecond tracing (#280)

* Add third-party minitrace library for tracing
* Add a time_seconds helper, for portability
* Add basic tracing support, using minitrace
* Add script to combine multiple trace.json