mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-21 00:50:35 +00:00
pch: fix template and direct-include fallout in non-PCH users
Adjust follow-on fallout from the broader PCH changes: - remove the redundant scheduling_group std::equal_to specialization from lang/wasm_instance_cache.cc - exclude small test link sets from PCH use in configure.py - add direct includes at files that no longer get needed declarations transitively
This commit is contained in:
19
configure.py
19
configure.py
@@ -2769,6 +2769,25 @@ def write_build_file(f,
|
||||
f.write('build {}: rust_source {}\n'.format(cc, src))
|
||||
obj = cc.replace('.cc', '.o')
|
||||
compiles[obj] = cc
|
||||
# Sources shared between scylla (compiled with PCH) and small tests
|
||||
# (with custom deps and partial link sets) must not use the PCH,
|
||||
# because -fpch-instantiate-templates injects symbol references that
|
||||
# the small test link sets cannot satisfy.
|
||||
small_test_srcs = set()
|
||||
for test_binary, test_deps in deps.items():
|
||||
if not test_binary.startswith('test/'):
|
||||
continue
|
||||
# Only exclude PCH for tests with truly small/partial link sets.
|
||||
# Tests that include scylla_core or similar large dep sets link
|
||||
# against enough objects to satisfy PCH-injected symbol refs.
|
||||
if len(test_deps) > 50:
|
||||
continue
|
||||
for src in test_deps:
|
||||
if src.endswith('.cc'):
|
||||
small_test_srcs.add(src)
|
||||
for src in small_test_srcs:
|
||||
obj = '$builddir/' + mode + '/' + src.replace('.cc', '.o')
|
||||
compiles_with_pch.discard(obj)
|
||||
for obj in compiles:
|
||||
src = compiles[obj]
|
||||
seastar_dep = f'$builddir/{mode}/seastar/libseastar.{seastar_lib_ext}'
|
||||
|
||||
@@ -284,14 +284,3 @@ future<> instance_cache::stop() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace std {
|
||||
|
||||
template <>
|
||||
struct equal_to<seastar::scheduling_group> {
|
||||
bool operator()(seastar::scheduling_group& sg1, seastar::scheduling_group& sg2) const noexcept {
|
||||
return sg1 == sg2;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
* SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.1
|
||||
*/
|
||||
#pragma once
|
||||
#include <unordered_set>
|
||||
#include "service/raft/group0_fwd.hh"
|
||||
|
||||
namespace service {
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <iosfwd>
|
||||
#include <variant>
|
||||
#include <vector>
|
||||
#include <seastar/core/timer.hh>
|
||||
#include <seastar/core/lowres_clock.hh>
|
||||
#include "raft/raft_fwd.hh"
|
||||
#include "gms/inet_address.hh"
|
||||
|
||||
|
||||
@@ -421,6 +421,7 @@
|
||||
#include "locator/types.hh"
|
||||
#include "mutation/mutation_fragment.hh"
|
||||
#include "mutation/mutation_partition.hh"
|
||||
#include "replica/database.hh"
|
||||
#include "schema/schema.hh"
|
||||
#include "schema/schema_builder.hh"
|
||||
#include "schema/schema_fwd.hh"
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#undef SEASTAR_TESTING_MAIN
|
||||
#include <seastar/testing/test_case.hh>
|
||||
#include "test/lib/cql_test_env.hh"
|
||||
#include "transport/messages/result_message.hh"
|
||||
#include "db/commitlog/commitlog_replayer.hh"
|
||||
#include "db/commitlog/commitlog.hh"
|
||||
#include "db/config.hh"
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include "mutation/mutation.hh"
|
||||
#include "service/storage_proxy.hh"
|
||||
#include "cql3/selection/selection.hh"
|
||||
|
||||
BOOST_AUTO_TEST_SUITE(per_partition_rate_limit_test)
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
|
||||
#include "test/lib/cql_test_env.hh"
|
||||
#include "test/lib/cql_assertions.hh"
|
||||
#include "transport/messages/result_message.hh"
|
||||
#include "cql3/result_set.hh"
|
||||
#include "service/migration_manager.hh"
|
||||
#include "service/storage_proxy.hh"
|
||||
#include "schema/schema_builder.hh"
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "test/lib/random_utils.hh"
|
||||
#include "service/topology_mutation.hh"
|
||||
#include "service/storage_service.hh"
|
||||
#include "gms/gossiper.hh"
|
||||
#include <fmt/ranges.h>
|
||||
#include <seastar/testing/thread_test_case.hh>
|
||||
#include <seastar/testing/on_internal_error.hh>
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
#include <seastar/coroutine/parallel_for_each.hh>
|
||||
#include <seastar/core/temporary_buffer.hh>
|
||||
#include <seastar/net/socket_defs.hh>
|
||||
#include <seastar/net/api.hh>
|
||||
#include <seastar/core/seastar.hh>
|
||||
#include <seastar/core/future.hh>
|
||||
#include <seastar/core/shared_ptr.hh>
|
||||
#include <seastar/core/thread.hh>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "vector_search/vector_store_client.hh"
|
||||
#include "vs_mock_server.hh"
|
||||
#include "test/lib/cql_test_env.hh"
|
||||
#include "transport/messages/result_message.hh"
|
||||
#include "utils/rjson.hh"
|
||||
#include <boost/test/tools/old/interface.hpp>
|
||||
#include <seastar/core/seastar.hh>
|
||||
|
||||
Reference in New Issue
Block a user