Appleby. See http://murmurhash.googlepages.com.
-src/snprintf.c and m4/snprintf.m4
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-This implementation of `snprintf()` and similar functions was downloaded from
-http://www.jhweiss.de/software/snprintf.html and has the following license:
-
--------------------------------------------------------------------------------
- Copyright (c) 1995 Patrick Powell.
-
- This code is based on code written by Patrick Powell <papowell@astart.com>.
- It may be used for any purpose as long as this notice remains intact on all
- source code distributions.
-
- Copyright (c) 2008 Holger Weiss.
-
- This version of the code is maintained by Holger Weiss <holger@jhweiss.de>.
- My changes to the code may freely be used, modified and/or redistributed for
- any purpose. It would be nice if additions and fixes to this file (including
- trivial code cleanups) would be sent back in order to let me include them in
- the version available at <http://www.jhweiss.de/software/snprintf.html>.
- However, this is not a requirement for using or redistributing (possibly
- modified) versions of this file, nor is leaving this notice intact mandatory.
--------------------------------------------------------------------------------
-
src/minitrace.[hc]
~~~~~~~~~~~~~~~~~~
SOFTWARE.
-------------------------------------------------------------------------------
+src/snprintf.c and m4/snprintf.m4
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This implementation of `snprintf()` and similar functions was downloaded from
+http://www.jhweiss.de/software/snprintf.html and has the following license:
+
+-------------------------------------------------------------------------------
+ Copyright (c) 1995 Patrick Powell.
+
+ This code is based on code written by Patrick Powell <papowell@astart.com>.
+ It may be used for any purpose as long as this notice remains intact on all
+ source code distributions.
+
+ Copyright (c) 2008 Holger Weiss.
+
+ This version of the code is maintained by Holger Weiss <holger@jhweiss.de>.
+ My changes to the code may freely be used, modified and/or redistributed for
+ any purpose. It would be nice if additions and fixes to this file (including
+ trivial code cleanups) would be sent back in order to let me include them in
+ the version available at <http://www.jhweiss.de/software/snprintf.html>.
+ However, this is not a requirement for using or redistributing (possibly
+ modified) versions of this file, nor is leaving this notice intact mandatory.
+-------------------------------------------------------------------------------
+
src/zlib/*.[hc]
~~~~~~~~~~~~~~~
<body class="article">\r
<div id="header">\r
<h1>ccache copyright and license</h1>\r
-<span id="revnumber">version 3.7</span>\r
+<span id="revnumber">version 3.7.1</span>\r
<div id="toc">
<div id="toctitle">Table of Contents</div>
<noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
Appleby. See <a href="http://murmurhash.googlepages.com">http://murmurhash.googlepages.com</a>.</p></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_src_snprintf_c_and_m4_snprintf_m4">src/snprintf.c and m4/snprintf.m4</h3>\r
-<div class="paragraph"><p>This implementation of <code>snprintf()</code> and similar functions was downloaded from\r
-<a href="http://www.jhweiss.de/software/snprintf.html">http://www.jhweiss.de/software/snprintf.html</a> and has the following license:</p></div>\r
-<div class="listingblock">\r
-<div class="content">\r
-<pre><code> Copyright (c) 1995 Patrick Powell.\r
-\r
- This code is based on code written by Patrick Powell <papowell@astart.com>.\r
- It may be used for any purpose as long as this notice remains intact on all\r
- source code distributions.\r
-\r
- Copyright (c) 2008 Holger Weiss.\r
-\r
- This version of the code is maintained by Holger Weiss <holger@jhweiss.de>.\r
- My changes to the code may freely be used, modified and/or redistributed for\r
- any purpose. It would be nice if additions and fixes to this file (including\r
- trivial code cleanups) would be sent back in order to let me include them in\r
- the version available at <http://www.jhweiss.de/software/snprintf.html>.\r
- However, this is not a requirement for using or redistributing (possibly\r
- modified) versions of this file, nor is leaving this notice intact mandatory.</code></pre>\r
-</div></div>\r
-</div>\r
-<div class="sect2">\r
<h3 id="_src_minitrace_hc">src/minitrace.[hc]</h3>\r
<div class="paragraph"><p>A library for producing JSON traces suitable for Chrome’s built-in trace viewer\r
(chrome://tracing). Downloaded from <a href="https://github.com/hrydgard/minitrace">https://github.com/hrydgard/minitrace</a>.</p></div>\r
</div></div>\r
</div>\r
<div class="sect2">\r
+<h3 id="_src_snprintf_c_and_m4_snprintf_m4">src/snprintf.c and m4/snprintf.m4</h3>\r
+<div class="paragraph"><p>This implementation of <code>snprintf()</code> and similar functions was downloaded from\r
+<a href="http://www.jhweiss.de/software/snprintf.html">http://www.jhweiss.de/software/snprintf.html</a> and has the following license:</p></div>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><code> Copyright (c) 1995 Patrick Powell.\r
+\r
+ This code is based on code written by Patrick Powell <papowell@astart.com>.\r
+ It may be used for any purpose as long as this notice remains intact on all\r
+ source code distributions.\r
+\r
+ Copyright (c) 2008 Holger Weiss.\r
+\r
+ This version of the code is maintained by Holger Weiss <holger@jhweiss.de>.\r
+ My changes to the code may freely be used, modified and/or redistributed for\r
+ any purpose. It would be nice if additions and fixes to this file (including\r
+ trivial code cleanups) would be sent back in order to let me include them in\r
+ the version available at <http://www.jhweiss.de/software/snprintf.html>.\r
+ However, this is not a requirement for using or redistributing (possibly\r
+ modified) versions of this file, nor is leaving this notice intact mandatory.</code></pre>\r
+</div></div>\r
+</div>\r
+<div class="sect2">\r
<h3 id="_src_zlib_hc">src/zlib/*.[hc]</h3>\r
<div class="paragraph"><p>This is a bundled subset of zlib 1.2.11 from <a href="http://zlib.net">http://zlib.net</a> with the\r
following license:</p></div>\r
<div id="footnotes"><hr /></div>\r
<div id="footer">\r
<div id="footer-text">\r
-Version 3.7<br />\r
+Version 3.7.1<br />\r
Last updated\r
- 2019-04-23 21:35:11 CEST\r
+ 2019-05-01 16:28:03 CEST\r
</div>\r
</div>\r
</body>\r
* [Mailing list](https://lists.samba.org/mailman/listinfo/ccache/)
* [Bug report info](https://ccache.dev/bugs.html)
* [Issue tracker](https://github.com/ccache/ccache/issues)
- * [Help wanted!](https://github.com/ccache/ccache/issues/help%20wanted)
- * [Good first issues!](https://github.com/ccache/ccache/issues/good%20first%20issue)
+ * [Help wanted!](https://github.com/ccache/ccache/labels/help%20wanted)
+ * [Good first issues!](https://github.com/ccache/ccache/labels/good%20first%20issue)
* Lalit Chhabra
* Lars Gustäbel
* Leanid Chaika
+* Loïc Yhuel
* Luboš Luňák
* Maarten Maathuis
* Mark Starovoytov
* Michael Meeks
* Michał Mirosław
* Mihai Serban
+* Mike Blumenkrantz
* Mike Frysinger
* Mike Gulick
* Mikhail Kolomeytsev
<body class="article">\r
<div id="header">\r
<h1>ccache authors</h1>\r
-<span id="revnumber">version 3.7</span>\r
+<span id="revnumber">version 3.7.1</span>\r
<div id="toc">
<div id="toctitle">Table of Contents</div>
<noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
</li>\r
<li>\r
<p>\r
+Loïc Yhuel\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
Luboš Luňák\r
</p>\r
</li>\r
</li>\r
<li>\r
<p>\r
+Mike Blumenkrantz\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
Mike Frysinger\r
</p>\r
</li>\r
<div id="footnotes"><hr /></div>\r
<div id="footer">\r
<div id="footer-text">\r
-Version 3.7<br />\r
+Version 3.7.1<br />\r
Last updated\r
- 2019-04-23 21:35:11 CEST\r
+ 2019-05-01 16:28:03 CEST\r
</div>\r
</div>\r
</body>\r
<body class="article">\r
<div id="header">\r
<h1>CCACHE(1)</h1>\r
-<span id="revnumber">version 3.7</span>\r
+<span id="revnumber">version 3.7.1</span>\r
<div id="toc">
<div id="toctitle">Table of Contents</div>
<noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
<div id="footnotes"><hr /></div>\r
<div id="footer">\r
<div id="footer-text">\r
-Version 3.7<br />\r
+Version 3.7.1<br />\r
Last updated\r
- 2019-04-23 21:35:11 CEST\r
+ 2019-05-01 16:28:03 CEST\r
</div>\r
</div>\r
</body>\r
ccache news
===========
+ccache 3.7.1
+------------
+Release date: 2019-05-01
+
+Changes
+~~~~~~~
+
+- Fixed a problem when using the compiler option `-MF /dev/null`.
+
+- Long commandlines are now handled gracefully on Windows by using the `@file`
+ syntax to avoid hitting the commandline size limit.
+
+- Fixed complaint from GCC 9’s `-Werror=format-overflow` when compiling ccache
+ itself.
+
+
ccache 3.7
----------
Release date: 2019-04-23
<body class="article">\r
<div id="header">\r
<h1>ccache news</h1>\r
-<span id="revnumber">version 3.7</span>\r
+<span id="revnumber">version 3.7.1</span>\r
<div id="toc">
<div id="toctitle">Table of Contents</div>
<noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
</div>\r
<div id="content">\r
<div class="sect1">\r
+<h2 id="_ccache_3_7_1">ccache 3.7.1</h2>\r
+<div class="sectionbody">\r
+<div class="paragraph"><p>Release date: 2019-05-01</p></div>\r
+<div class="sect2">\r
+<h3 id="_changes">Changes</h3>\r
+<div class="ulist"><ul>\r
+<li>\r
+<p>\r
+Fixed a problem when using the compiler option <code>-MF /dev/null</code>.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+Long commandlines are now handled gracefully on Windows by using the <code>@file</code>\r
+ syntax to avoid hitting the commandline size limit.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+Fixed complaint from GCC 9’s <code>-Werror=format-overflow</code> when compiling ccache\r
+ itself.\r
+</p>\r
+</li>\r
+</ul></div>\r
+</div>\r
+</div>\r
+</div>\r
+<div class="sect1">\r
<h2 id="_ccache_3_7">ccache 3.7</h2>\r
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2019-04-23</p></div>\r
<div class="sect2">\r
-<h3 id="_changes">Changes</h3>\r
+<h3 id="_changes_2">Changes</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2019-01-14</p></div>\r
<div class="sect2">\r
-<h3 id="_changes_2">Changes</h3>\r
+<h3 id="_changes_3">Changes</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2019-01-02</p></div>\r
<div class="sect2">\r
-<h3 id="_changes_3">Changes</h3>\r
+<h3 id="_changes_4">Changes</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2018-10-15</p></div>\r
<div class="sect2">\r
-<h3 id="_changes_4">Changes</h3>\r
+<h3 id="_changes_5">Changes</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
<div id="footnotes"><hr /></div>\r
<div id="footer">\r
<div id="footer-text">\r
-Version 3.7<br />\r
+Version 3.7.1<br />\r
Last updated\r
- 2019-04-23 21:35:11 CEST\r
+ 2019-05-01 16:28:03 CEST\r
</div>\r
</div>\r
</body>\r
.\" Title: ccache
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\" Date: 04/23/2019
+.\" Date: 05/01/2019
.\" Manual: ccache Manual
-.\" Source: ccache 3.7
+.\" Source: ccache 3.7.1
.\" Language: English
.\"
-.TH "CCACHE" "1" "04/23/2019" "ccache 3\&.7" "ccache Manual"
+.TH "CCACHE" "1" "05/01/2019" "ccache 3\&.7\&.1" "ccache Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
update_cached_result_globals(object_hash);
}
- if (generating_dependencies) {
+ bool produce_dep_file =
+ generating_dependencies && !str_eq(output_dep, "/dev/null");
+
+ if (produce_dep_file) {
use_relative_paths_in_depfile(output_dep);
}
MTR_BEGIN("file", "file_put");
copy_file_to_cache(output_obj, cached_obj);
- if (generating_dependencies) {
+ if (produce_dep_file) {
copy_file_to_cache(output_dep, cached_dep);
}
if (generating_coverage) {
hash_delimiter(hash, "arg");
hash_string_buffer(hash, args->argv[i], 3);
- bool separate_argument = (strlen(args->argv[i]) == 3);
- if (separate_argument) {
- // Next argument is dependency name, so skip it.
- i++;
+ if (!str_eq(output_dep, "/dev/null")) {
+ bool separate_argument = (strlen(args->argv[i]) == 3);
+ if (separate_argument) {
+ // Next argument is dependency name, so skip it.
+ i++;
+ }
}
continue;
}
}
}
+ // Make results with dependency file /dev/null different from those without
+ // it.
+ if (generating_dependencies && str_eq(output_dep, "/dev/null")) {
+ hash_delimiter(hash, "/dev/null dependency file");
+ }
+
if (!found_ccbin && str_eq(actual_language, "cuda")) {
hash_nvcc_host_compiler(hash, NULL, NULL);
}
args_pop(args, 1);
}
if (generating_dependencies) {
- cc_log("Preprocessor created %s", output_dep);
+ // Nothing is actually created with -MF /dev/null
+ if (!str_eq(output_dep, "/dev/null")) {
+ cc_log("Preprocessor created %s", output_dep);
+ }
}
}
// (If mode != FROMCACHE_DIRECT_MODE, the dependency file is created by gcc.)
bool produce_dep_file =
- generating_dependencies && mode == FROMCACHE_DIRECT_MODE;
+ generating_dependencies && mode == FROMCACHE_DIRECT_MODE
+ && !str_eq(output_dep, "/dev/null");
MTR_BEGIN("file", "file_get");
result = false;
goto out;
} else if (arg_profile_dir) {
- cc_log("Setting profile directory to %s", profile_dir);
+ cc_log("Setting profile directory to %s", arg_profile_dir);
profile_dir = x_strdup(arg_profile_dir);
}
continue;
MTR_END("main", "process_args");
if (conf->depend_mode
- && (!generating_dependencies || !conf->run_second_cpp || conf->unify)) {
+ && (!generating_dependencies || str_eq(output_dep, "/dev/null")
+ || !conf->run_second_cpp || conf->unify)) {
cc_log("Disabling depend mode");
conf->depend_mode = false;
}
#endif
#ifdef _WIN32
-char *win32argvtos(char *prefix, char **argv);
+char *win32argvtos(char *prefix, char **argv, int *length);
char *win32getshell(char *path);
int win32execute(char *path, char **argv, int doreturn,
int fd_stdout, int fd_stderr);
static bool
parse_line(const char *line, char **key, char **value, char **errmsg)
{
-#define SKIP_WS(x) while (isspace(*x)) { ++x; }
+#define SKIP_WS(x) do { while (isspace(*x)) { ++x; } } while (false)
*key = NULL;
*value = NULL;
// Copyright (C) 2002 Andrew Tridgell
-// Copyright (C) 2011-2018 Joel Rosdahl
+// Copyright (C) 2011-2019 Joel Rosdahl
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Re-create a win32 command line string based on **argv.
// http://msdn.microsoft.com/en-us/library/17w5ykft.aspx
char *
-win32argvtos(char *prefix, char **argv)
+win32argvtos(char *prefix, char **argv, int *length)
{
int i = 0;
int k = 0;
char *ptr = malloc(k + 1);
char *str = ptr;
if (!str) {
+ *length = 0;
return NULL;
}
} while ((arg = argv[i++]));
ptr[-1] = '\0';
+ *length = ptr - str - 1;
return str;
}
}
}
- char *args = win32argvtos(sh, argv);
+ int length;
+ char *args = win32argvtos(sh, argv, &length);
const char *ext = strrchr(path, '.');
char full_path_win_ext[MAX_PATH] = {0};
add_exe_ext_if_no_to_fullpath(full_path_win_ext, MAX_PATH, ext, path);
- BOOL ret =
- CreateProcess(full_path_win_ext, args, NULL, NULL, 1, 0, NULL, NULL,
- &si, &pi);
+ BOOL ret = FALSE;
+ if (length > 8192) {
+ char *tmp_file = format("%s.tmp", path);
+ FILE *fp = create_tmp_file(&tmp_file, "w");
+ char atfile[MAX_PATH + 3];
+ fwrite(args, 1, length, fp);
+ if (ferror(fp)) {
+ cc_log("Error writing @file; this command will probably fail: %s", args);
+ }
+ fclose(fp);
+ snprintf(atfile, sizeof(atfile), "\"@%s\"", tmp_file);
+ ret = CreateProcess(NULL, atfile, NULL, NULL, 1, 0, NULL, NULL,
+ &si, &pi);
+ tmp_unlink(tmp_file);
+ free(tmp_file);
+ }
+ if (!ret) {
+ ret = CreateProcess(full_path_win_ext, args, NULL, NULL, 1, 0, NULL, NULL,
+ &si, &pi);
+ }
if (fd_stdout != -1) {
close(fd_stdout);
close(fd_stderr);
char *win32args;
if (!cmd) {
- win32args = win32argvtos(sh, args->argv);
+ int length;
+ win32args = win32argvtos(sh, args->argv, &length);
} else {
win32args = (char *)command; // quoted
}
// Returns a formatted version of a statistics value, or NULL if the statistics
// line shouldn't be printed. Caller frees.
-typedef char *format_fn(uint64_t value);
+typedef char *(*format_fn)(uint64_t value);
-static format_fn format_size_times_1024;
-static format_fn format_timestamp;
+static char *format_size_times_1024(uint64_t size);
+static char *format_timestamp(uint64_t timestamp);
// Statistics fields in display order.
static struct {
enum stats stat;
const char *id; // for --print-stats
const char *message; // for --show-stats
- format_fn *format_fn; // NULL -> use plain integer format
+ format_fn format; // NULL -> use plain integer format
unsigned flags;
} stats_info[] = {
{
}
char *value;
- if (stats_info[i].format_fn) {
- value = stats_info[i].format_fn(counters->data[stat]);
+ if (stats_info[i].format) {
+ value = stats_info[i].format(counters->data[stat]);
} else {
value = format("%8u", counters->data[stat]);
}
-extern const char CCACHE_VERSION[]; const char CCACHE_VERSION[] = "3.7";
+extern const char CCACHE_VERSION[]; const char CCACHE_VERSION[] = "3.7.1";
expect_stat 'files in cache' 3
# -------------------------------------------------------------------------
+ TEST "No dependency file"
+
+ CCACHE_DEPEND=1 $CCACHE_COMPILE -MP -MMD -MF /dev/null -c test.c
+ expect_stat 'cache hit (direct)' 0
+ expect_stat 'cache hit (preprocessed)' 0
+ expect_stat 'cache miss' 1
+ expect_stat 'files in cache' 2 # .o + .manifest
+
+ CCACHE_DEPEND=1 $CCACHE_COMPILE -MP -MMD -MF /dev/null -c test.c
+ expect_stat 'cache hit (direct)' 1
+ expect_stat 'cache hit (preprocessed)' 0
+ expect_stat 'cache miss' 1
+ expect_stat 'files in cache' 2
+
+ # -------------------------------------------------------------------------
TEST "No explicit dependency file"
$REAL_COMPILER $DEPSFLAGS_REAL -c -o reference_test.o test.c
rm -f third_name.d
# -------------------------------------------------------------------------
+ TEST "MF /dev/null"
+
+ $CCACHE_COMPILE -c -MD -MF /dev/null test.c
+ expect_stat 'cache hit (direct)' 0
+ expect_stat 'cache hit (preprocessed)' 0
+ expect_stat 'cache miss' 1
+ expect_stat 'files in cache' 2 # .o + .manifest
+
+ $CCACHE_COMPILE -c -MD -MF /dev/null test.c
+ expect_stat 'cache hit (direct)' 1
+ expect_stat 'cache hit (preprocessed)' 0
+ expect_stat 'cache miss' 1
+ expect_stat 'files in cache' 2
+
+ $CCACHE_COMPILE -c -MD -MF test.d test.c
+ expect_stat 'cache hit (direct)' 1
+ expect_stat 'cache hit (preprocessed)' 0
+ expect_stat 'cache miss' 2
+ expect_stat 'files in cache' 5
+ expect_equal_files test.d expected.d
+
+ rm -f test.d
+
+ $CCACHE_COMPILE -c -MD -MF test.d test.c
+ expect_stat 'cache hit (direct)' 2
+ expect_stat 'cache hit (preprocessed)' 0
+ expect_stat 'cache miss' 2
+ expect_stat 'files in cache' 5
+ expect_equal_files test.d expected.d
+
+ # -------------------------------------------------------------------------
TEST "Missing .d file"
$CCACHE_COMPILE -c -MD test.c
expect_stat 'cache miss' 1
expect_equal_files different_name.d expected_sunpro_dependencies_target.d
expect_equal_object_files reference_test.o test.o
+
+ # -------------------------------------------------------------------------
+ TEST "DEPENDENCIES_OUTPUT environment variable set to /dev/null"
+
+ DEPENDENCIES_OUTPUT="/dev/null" $CCACHE_COMPILE -c test.c
+ expect_stat 'cache hit (direct)' 0
+ expect_stat 'cache hit (preprocessed)' 0
+ expect_stat 'cache miss' 1
+
+ DEPENDENCIES_OUTPUT="other.d" $CCACHE_COMPILE -c test.c
+ expect_stat 'cache hit (direct)' 0
+ expect_stat 'cache hit (preprocessed)' 0
+ expect_stat 'cache miss' 2
}
-// Copyright (C) 2010-2018 Joel Rosdahl
+// Copyright (C) 2010-2019 Joel Rosdahl
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
{
cct_wipe(path);
if (mkdir(path, 0777) != 0) {
- fprintf(stderr, "mkdir: %s: %s", path, strerror(errno));;
+ fprintf(stderr, "mkdir: %s: %s", path, strerror(errno));
abort();
}
}