#include <string>
#include <unordered_map>
-enum class CompilerType { auto_guess, clang, gcc, nvcc, other, pump, cl };
+enum class CompilerType { auto_guess, clang, gcc, nvcc, other, cl };
std::string compiler_type_to_string(CompilerType compiler_type);
return CompilerType::gcc;
} else if (name.find("nvcc") != nonstd::string_view::npos) {
return CompilerType::nvcc;
- } else if (name == "pump" || name == "distcc-pump") {
- return CompilerType::pump;
} else if (name.find("cl") != nonstd::string_view::npos) {
return CompilerType::cl;
} else {
// when computing the hash sum.
// - Stores the paths and hashes of included files in ctx.included_files.
static nonstd::expected<void, Failure>
-process_preprocessed_file(Context& ctx,
- Hash& hash,
- const std::string& path,
- bool pump)
+process_preprocessed_file(Context& ctx, Hash& hash, const std::string& path)
{
std::string data;
try {
"bin directive in source code");
return nonstd::make_unexpected(
Failure(Statistic::unsupported_code_directive));
- } else if (pump && strncmp(q, "_________", 9) == 0) {
+ } else if (strncmp(q, "___________", 10) == 0) {
// Unfortunately the distcc-pump wrapper outputs standard output lines:
// __________Using distcc-pump from /usr/bin
// __________Using # distcc servers in pump mode
// __________Using # distcc servers in pump mode
//
// We don't want to cache those.
- if (!stdout_data.empty()
- && ctx.config.compiler_type() == CompilerType::pump) {
+ if (!stdout_data.empty()) {
std::string new_stdout_text;
for (const auto line : util::Tokenizer(
stdout_data, "\n", util::Tokenizer::Mode::include_empty)) {
}
hash.hash_delimiter("cpp");
- const bool is_pump = ctx.config.compiler_type() == CompilerType::pump;
- TRY(process_preprocessed_file(ctx, hash, stdout_path, is_pump));
+ TRY(process_preprocessed_file(ctx, hash, stdout_path));
hash.hash_delimiter("cppstderr");
if (!ctx.args_info.direct_i_file && !hash.hash_file(stderr_path)) {
" #A comment\n"
"\t compiler = foo\n"
"compiler_check = none\n"
- "compiler_type = pump\n"
+ "compiler_type = nvcc\n"
"compression=false\n"
"compression_level= 2\n"
"cpp_extension = .foo\n"
CHECK(config.cache_dir() == FMT("{0}$/{0}/.ccache", user));
CHECK(config.compiler() == "foo");
CHECK(config.compiler_check() == "none");
- CHECK(config.compiler_type() == CompilerType::pump);
+ CHECK(config.compiler_type() == CompilerType::nvcc);
CHECK_FALSE(config.compression());
CHECK(config.compression_level() == 2);
CHECK(config.cpp_extension() == ".foo");
CHECK(guess_compiler("/test/prefix/nvcc") == CompilerType::nvcc);
CHECK(guess_compiler("/test/prefix/nvcc-10.1.243") == CompilerType::nvcc);
- CHECK(guess_compiler("/test/prefix/pump") == CompilerType::pump);
- CHECK(guess_compiler("/test/prefix/distcc-pump") == CompilerType::pump);
-
CHECK(guess_compiler("/test/prefix/x") == CompilerType::other);
CHECK(guess_compiler("/test/prefix/cc") == CompilerType::other);
CHECK(guess_compiler("/test/prefix/c++") == CompilerType::other);