* Test nvcc and clang-cuda in workflows/ci.yml
* Fix clang-cuda tests
* Ensure /tmp/sccache_*.txt files are included in failed job artifacts on Windows
* Adds top-level `Cicc` and `Ptxas` compiler types
* Updates `Nvcc` compiler implementation to decompose nvcc calls into its constituent subcompiler invocations via the `nvcc --dryrun` flag
* Bumps the `sccache-dist` request timeout from 5 to 10 minutes, because nvcc compilations can take a while
* Updates the CUDA tests, separates into tests for nvcc and clang since now their behavior is different
* Fixes lint
* Refactor `CompileCommand` into a trait with an execute function that accepts an `SccacheService<T>` ref and a `CommandCreatorSync` ref
* Rename `CompileCommand` struct to `SingleCompileCommand`
* Update all `generate_compile_command()` implementations to return a boxed `CompileCommand` trait
This allows compilers to return custom implementations of the `CompileCommand` trait that execute more complex logic than simply launching a subprocess.
* Spawn the tokio compilation task in `check_compiler()` instead of in `start_compile_task()`
* Map the tokio compilation task into a stream, and return that stream as the response body
These changes reduce the amount of memory leaked when building the default linux target with glibc.
Refactoring `start_compile_task()` to be an async function is a necessary change to support re-entrancy for sccache-dist nvcc support.
* *: add UDS support
A new module named `net` is added to unify TCP socket and UDS.
By default, sccache server is still listen on local TCP port,
user can choose to listen on UDS by setting environment variable
`SCCACHE_SERVER_UDS`.
Generic is used in server implementation for best performance,
trait object is used in client implementation for simplicity and
better readability.
Close#933.
Signed-off-by: Jay Lee <busyjaylee@gmail.com>
* fix linux compile errors
Signed-off-by: Jay Lee <busyjaylee@gmail.com>
* fix format
Signed-off-by: Jay Lee <busyjaylee@gmail.com>
* more fix
Signed-off-by: Jay Lee <busyjaylee@gmail.com>
* fix windows
Signed-off-by: Jay Lee <busyjaylee@gmail.com>
* address comment
Signed-off-by: Jay Lee <busyjaylee@gmail.com>
* fix gcc failure
Signed-off-by: Jay Lee <busyjaylee@gmail.com>
* address comment
Signed-off-by: Jay Lee <busyjaylee@gmail.com>
* fix clippy
Signed-off-by: Jay Lee <busyjaylee@gmail.com>
---------
Signed-off-by: Jay Lee <busyjaylee@gmail.com>
* Add `objective-c++-header` as supported language.
* Parse -ivfsstatcache
* Simplify Xcode CI / Docs
I happened to stumble upon the `C_COMPILER_LAUNCHER` Xcode attribute,
which fits the bill perfectly, so use that instead.
When compiling with PCH enabled, it happens that some times object files
end up with PCH content, or that .gch files end up with object code.
Simplest way to reproduce the problem:
$ touch empty.c
$ gcc -c -o out1 empty.c
$ gcc -x c-header -c -o out2 empty.c
$ file out1 out2
out1: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
out2: GCC precompiled header (version 014) for C
The two files are different. But if we feed these compilations to
sccache, they lead to the same result:
$ sccache gcc -c -o out3 empty.c
$ sccache gcc -x c-header -c -o out4 empty.c
$ file out3 out4
out3: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
out4: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
Same thing is reproducible with c++ compiler and -x c++-header argument.
The reason is that the hash string that identifies each command line is
the same.
With this patch, compilation of C files is always differentiated from
compilations of same C-Header files. And compilation of C++ files is
always differentiated from compilations of same C++-Header files.
Fixes#1851.
* Mark `-index-store-path` as Hard
Xcode sets it by default, but it can be disabled with
`COMPILER_INDEX_STORE_ENABLE=NO` Xcode build setting.
* Mark serialize-diagnostics and deps as artifacts
Xcode requires these files to be present after compiling, so they need
to be stored and restored for the build to complete.
* Update tests for the dep changes
* Add test for `-index-store-path`
* Add documentation for Xcode use
* Xcode integration test
* Add comment about wrapper script use
* Add custom zstd compression level
* docs for SCCACHE_CACHE_ZSTD_LEVEL
* add zstd level test
* docs for zstd level that warns new cache required
* fix integration-test of zstd-compression-level