Skip to content

Commit

Permalink
Merge pull request LeelaChessZero#10 from shermansiu/fix/fix-compile-…
Browse files Browse the repository at this point in the history
…errors

Fixes compilation errors.
  • Loading branch information
Ergodice authored Feb 8, 2024
2 parents b2b9960 + c3ced85 commit d8f5dfd
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 9 deletions.
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ if get_option('build_backends')
includes += include_directories('src/neural/cuda/')

cuda_arguments = ['-c', '@INPUT@', '-o', '@OUTPUT@',
'-I', meson.source_root() + '/subprojects/abseil-cpp-20220623.0',
'-I', meson.source_root() + '/subprojects/abseil-cpp-20230125.1',
'-I', meson.current_source_dir() + '/src']
nvcc_help = run_command(nvcc, '-h').stdout()
if host_machine.system() == 'windows'
Expand Down
15 changes: 15 additions & 0 deletions src/utils/mutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,21 @@
#include <shared_mutex>
#include <thread>

#if defined(__clang__) && (!defined(SWIG))
#define THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x))
#else
#define THREAD_ANNOTATION_ATTRIBUTE__(x) // no-op
#endif

#define GUARDED_BY(x) \
THREAD_ANNOTATION_ATTRIBUTE__(guarded_by(x))

#define ACQUIRED_AFTER(...) \
THREAD_ANNOTATION_ATTRIBUTE__(acquired_after(__VA_ARGS__))

#define NO_THREAD_SAFETY_ANALYSIS \
THREAD_ANNOTATION_ATTRIBUTE__(no_thread_safety_analysis)

#if !defined(__arm__) && !defined(__aarch64__) && !defined(_M_ARM) && \
!defined(_M_ARM64)
#include <emmintrin.h>
Expand Down
95 changes: 87 additions & 8 deletions subprojects/abseil-cpp.wrap
Original file line number Diff line number Diff line change
@@ -1,23 +1,102 @@
[wrap-file]
directory = abseil-cpp-20220623.0
source_url = https://github.com/abseil/abseil-cpp/archive/20220623.0.tar.gz
source_filename = abseil-cpp-20220623.0.tar.gz
source_hash = 4208129b49006089ba1d6710845a45e31c59b0ab6bff9e5788a87f55c5abd602
patch_filename = abseil-cpp_20220623.0-2_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/abseil-cpp_20220623.0-2/get_patch
patch_hash = d19cb16610d9310658a815ebcd87a9e2966aafbd57964341c0d1a3a3778c03b6
wrapdb_version = 20220623.0-2
directory = abseil-cpp-20230125.1
source_url = https://github.com/abseil/abseil-cpp/archive/20230125.1.tar.gz
source_filename = abseil-cpp-20230125.1.tar.gz
source_hash = 81311c17599b3712069ded20cca09a62ab0bf2a89dfa16993786c8782b7ed145
patch_filename = abseil-cpp_20230125.1-5_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/abseil-cpp_20230125.1-5/get_patch
patch_hash = 31fa35f476c3a9a4307f60780dd6cc4d3c05f5ee90e251ee9dcbd6d14f70dceb
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/abseil-cpp_20230125.1-5/abseil-cpp-20230125.1.tar.gz
wrapdb_version = 20230125.1-5

[provide]
absl_base = absl_base_dep
absl_container = absl_container_dep
absl_debugging = absl_debugging_dep
absl_log = absl_log_dep
absl_flags = absl_flags_dep
absl_hash = absl_hash_dep
absl_crc = absl_crc_dep
absl_numeric = absl_numeric_dep
absl_profiling = absl_profiling_dep
absl_random = absl_random_dep
absl_status = absl_status_dep
absl_strings = absl_strings_dep
absl_synchronization = absl_synchronization_dep
absl_time = absl_time_dep
absl_types = absl_types_dep
absl_algorithm_container = absl_base_dep
absl_any_invocable = absl_base_dep
absl_bad_any_cast_impl = absl_types_dep
absl_bad_optional_access = absl_types_dep
absl_bad_variant_access = absl_types_dep
absl_bind_front = absl_base_dep
absl_city = absl_hash_dep
absl_civil_time = absl_time_dep
absl_cleanup = absl_base_dep
absl_cord = absl_strings_dep
absl_cord_internal = absl_strings_dep
absl_cordz_functions = absl_strings_dep
absl_cordz_handle = absl_strings_dep
absl_cordz_info = absl_strings_dep
absl_cordz_sample_token = absl_strings_dep
absl_core_headers = absl_base_dep
absl_debugging_internal = absl_debugging_dep
absl_demangle_internal = absl_debugging_dep
absl_examine_stack = absl_debugging_dep
absl_exponential_biased = absl_profiling_dep
absl_failure_signal_handler = absl_debugging_dep
absl_flags_commandlineflag = absl_flags_dep
absl_flags_commandlineflag_internal = absl_flags_dep
absl_flags_config = absl_flags_dep
absl_flags_internal = absl_flags_dep
absl_flags_marshalling = absl_flags_dep
absl_flags_parse = absl_flags_dep
absl_flags_private_handle_accessor = absl_flags_dep
absl_flags_program_name = absl_flags_dep
absl_flags_reflection = absl_flags_dep
absl_flags_usage = absl_flags_dep
absl_flags_usage_internal = absl_flags_dep
absl_flat_hash_map = absl_container_dep
absl_flat_hash_set = absl_container_dep
absl_function_ref = absl_base_dep
absl_graphcycles_internal = absl_synchronization_dep
absl_hashtablez_sampler = absl_container_dep
absl_inlined_vector = absl_container_dep
absl_int128 = absl_numeric_dep
absl_leak_check = absl_debugging_dep
absl_log_severity = absl_base_dep
absl_low_level_hash = absl_hash_dep
absl_memory = absl_base_dep
absl_optional = absl_types_dep
absl_periodic_sampler = absl_profiling_dep
absl_random_bit_gen_ref = absl_random_dep
absl_random_distributions = absl_random_dep
absl_random_internal_distribution_test_util = absl_random_dep
absl_random_internal_platform = absl_random_dep
absl_random_internal_pool_urbg = absl_random_dep
absl_random_internal_randen = absl_random_dep
absl_random_internal_randen_hwaes = absl_random_dep
absl_random_internal_randen_hwaes_impl = absl_random_dep
absl_random_internal_randen_slow = absl_random_dep
absl_random_internal_seed_material = absl_random_dep
absl_random_random = absl_random_dep
absl_random_seed_gen_exception = absl_random_dep
absl_random_seed_sequences = absl_random_dep
absl_raw_hash_set = absl_container_dep
absl_raw_logging_internal = absl_base_dep
absl_scoped_set_env = absl_base_dep
absl_span = absl_types_dep
absl_spinlock_wait = absl_base_dep
absl_stacktrace = absl_debugging_dep
absl_statusor = absl_status_dep
absl_str_format = absl_strings_dep
absl_str_format_internal = absl_strings_dep
absl_strerror = absl_base_dep
absl_strings_internal = absl_strings_dep
absl_symbolize = absl_debugging_dep
absl_throw_delegate = absl_base_dep
absl_time_zone = absl_time_dep
absl_type_traits = absl_base_dep
absl_utility = absl_base_dep
absl_variant = absl_types_dep

0 comments on commit d8f5dfd

Please sign in to comment.