sccache/tests
Michael Kruse da2934fcc2
Use clang -fminimize-whitespace to increase cache hits. (#1162)
* Add -fminimize-whitespace preprocessor flag when Clang >= 14 to increase cache hits

This proof of concept tries to take advantage of the new `-fminimize-whitespace`
preprocessor option in Clang. `-fminimize-whitespace` was added to Clang with the
intention to help increase the chance of a cache hit in tools like `sccache`
when only whitespace changes.

I also added a `version()` method to CCompilerImpl trait to expose the compiler
version to the preprocessor. This could be useful if version-dependent
features are added to `sccache` in the future.

Feedback on this is definitely welcome!

* Add tests for clang whitespace normalization

* Use clang -fminimize-whitespace to incread cache hits.

* Use ubuntu-22.04 for testing Clang 14

* Move compiler version from CCompiler to each CCompilerImpl.

* Use semver

Co-authored-by: Max Fan <root@max.fan>
Co-authored-by: Michael Kruse <sccache@meinersbur.de>
2022-04-29 08:21:18 +02:00
..
harness Fix clippy lints 2022-02-13 12:41:11 +01:00
test-crate Ignore lockfiles of test crates used in the integration tests (#1149) 2022-03-22 12:36:59 -04:00
dist.rs Fix clippy lints for dist-server (#1119) 2022-02-14 14:40:03 -05:00
oauth.rs Migrate to a Tokio 1.0-capable Selenium webdriver crate 2021-12-20 19:13:58 +01:00
sccache_cargo.rs Parse env-deps from dep-info (#1107) 2022-03-01 16:21:36 -05:00
system.rs Use clang -fminimize-whitespace to increase cache hits. (#1162) 2022-04-29 08:21:18 +02:00
test.c Move system tests to tests/ 2018-07-26 16:12:14 -04:00
test_err.c Move system tests to tests/ 2018-07-26 16:12:14 -04:00
test_macro_expansion.c Added test case for disabled macro expansion 2019-11-23 10:48:25 -08:00
test_whitespace.c Use clang -fminimize-whitespace to increase cache hits. (#1162) 2022-04-29 08:21:18 +02:00
test_whitespace_alt.c Use clang -fminimize-whitespace to increase cache hits. (#1162) 2022-04-29 08:21:18 +02:00
test_with_define.c Added test case with a required define 2019-11-23 10:48:25 -08:00