diff options
author | Michal Klocek <michal.klocek@qt.io> | 2017-01-31 17:21:13 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-03-26 09:34:24 +0000 |
commit | 7877acae74f501a4663566e9dd70f6704de75a29 (patch) | |
tree | e9b5fd754cd07614fb711467a7e024cd364d4783 | |
parent | 2a72d554d152dcf771b94ed90ae5e16df86f8631 (diff) | |
download | qtwebengine-chromium-7877acae74f501a4663566e9dd70f6704de75a29.tar.gz |
Remove linking with libatomic
Rhel machines on ci do not have it.
Change-Id: I4cbb6d9d0826a23f8065a9eebba7ba27856e44d4
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r-- | chromium/base/BUILD.gn | 2 | ||||
-rw-r--r-- | chromium/base/memory/madv_free_discardable_memory_posix.cc | 4 | ||||
-rw-r--r-- | chromium/base/metrics/persistent_memory_allocator.cc | 2 | ||||
-rw-r--r-- | chromium/base/profiler/metadata_recorder.cc | 2 | ||||
-rw-r--r-- | chromium/base/task/thread_pool/thread_group.cc | 2 | ||||
-rw-r--r-- | chromium/build/config/linux/BUILD.gn | 2 | ||||
-rw-r--r-- | chromium/services/tracing/public/cpp/perfetto/trace_event_data_source.cc | 2 |
7 files changed, 14 insertions, 2 deletions
diff --git a/chromium/base/BUILD.gn b/chromium/base/BUILD.gn index 894f0a06330..b88e9dbdb2d 100644 --- a/chromium/base/BUILD.gn +++ b/chromium/base/BUILD.gn @@ -1306,7 +1306,7 @@ jumbo_component("base") { # building inside the cros_sdk environment - use host_toolchain as a # more robust check for this. if (!use_sysroot && - (is_android || ((is_linux || is_chromeos) && !is_chromecast)) && + (is_android || ((is_linux || is_chromeos) && !is_chromecast && !use_qt)) && host_toolchain != "//build/toolchain/cros:host") { libs += [ "atomic" ] } diff --git a/chromium/base/memory/madv_free_discardable_memory_posix.cc b/chromium/base/memory/madv_free_discardable_memory_posix.cc index 82a6625de26..3cc1c8c405c 100644 --- a/chromium/base/memory/madv_free_discardable_memory_posix.cc +++ b/chromium/base/memory/madv_free_discardable_memory_posix.cc @@ -165,7 +165,9 @@ bool MadvFreeDiscardableMemoryPosix::LockPage(size_t page_index) { // the same byte-level representation. static_assert(sizeof(intptr_t) == sizeof(std::atomic<intptr_t>), "Incompatible layout of std::atomic."); +#ifndef TOOLKIT_QT DCHECK(std::atomic<intptr_t>{}.is_lock_free()); +#endif std::atomic<intptr_t>* page_as_atomic = reinterpret_cast<std::atomic<intptr_t>*>( static_cast<uint8_t*>(data_) + page_index * base::GetPageSize()); @@ -187,7 +189,9 @@ bool MadvFreeDiscardableMemoryPosix::LockPage(size_t page_index) { } void MadvFreeDiscardableMemoryPosix::UnlockPage(size_t page_index) { +#ifndef TOOLKIT_QT DCHECK(std::atomic<intptr_t>{}.is_lock_free()); +#endif std::atomic<intptr_t>* page_as_atomic = reinterpret_cast<std::atomic<intptr_t>*>( diff --git a/chromium/base/metrics/persistent_memory_allocator.cc b/chromium/base/metrics/persistent_memory_allocator.cc index 03d14e4e01b..b61c4cc3a4c 100644 --- a/chromium/base/metrics/persistent_memory_allocator.cc +++ b/chromium/base/metrics/persistent_memory_allocator.cc @@ -349,11 +349,13 @@ PersistentMemoryAllocator::PersistentMemoryAllocator(Memory memory, // Ensure that memory segment is of acceptable size. CHECK(IsMemoryAcceptable(memory.base, size, page_size, readonly)); +#ifndef TOOLKIT_QT // These atomics operate inter-process and so must be lock-free. DCHECK(SharedMetadata().freeptr.is_lock_free()); DCHECK(SharedMetadata().flags.is_lock_free()); DCHECK(BlockHeader().next.is_lock_free()); CHECK(corrupt_.is_lock_free()); +#endif if (shared_meta()->cookie != kGlobalCookie) { if (readonly) { diff --git a/chromium/base/profiler/metadata_recorder.cc b/chromium/base/profiler/metadata_recorder.cc index f140c2547f6..2e71ee20297 100644 --- a/chromium/base/profiler/metadata_recorder.cc +++ b/chromium/base/profiler/metadata_recorder.cc @@ -28,8 +28,10 @@ MetadataRecorder::ItemInternal::~ItemInternal() = default; MetadataRecorder::MetadataRecorder() { // Ensure that we have necessary atomic support. +#ifndef TOOLKIT_QT DCHECK(items_[0].is_active.is_lock_free()); DCHECK(items_[0].value.is_lock_free()); +#endif } MetadataRecorder::~MetadataRecorder() = default; diff --git a/chromium/base/task/thread_pool/thread_group.cc b/chromium/base/task/thread_pool/thread_group.cc index 4832a40b2f6..ab523bf2c69 100644 --- a/chromium/base/task/thread_pool/thread_group.cc +++ b/chromium/base/task/thread_pool/thread_group.cc @@ -265,7 +265,9 @@ void ThreadGroup::InvalidateAndHandoffAllTaskSourcesToOtherThreadGroup( } bool ThreadGroup::ShouldYield(TaskSourceSortKey sort_key) { +#ifndef TOOLKIT_QT DCHECK(TS_UNCHECKED_READ(max_allowed_sort_key_).is_lock_free()); +#endif if (!task_tracker_->CanRunPriority(sort_key.priority())) return true; diff --git a/chromium/build/config/linux/BUILD.gn b/chromium/build/config/linux/BUILD.gn index 92282c87948..ada551a4f49 100644 --- a/chromium/build/config/linux/BUILD.gn +++ b/chromium/build/config/linux/BUILD.gn @@ -30,7 +30,7 @@ config("runtime_library") { if ((!(is_chromeos || chromeos_is_browser_only) || default_toolchain != "//build/toolchain/cros:target") && - (!use_custom_libcxx || current_cpu == "mipsel")) { + (!use_custom_libcxx || current_cpu == "mipsel") && !use_qt) { libs = [ "atomic" ] } } diff --git a/chromium/services/tracing/public/cpp/perfetto/trace_event_data_source.cc b/chromium/services/tracing/public/cpp/perfetto/trace_event_data_source.cc index d0c7b193964..ad25345de45 100644 --- a/chromium/services/tracing/public/cpp/perfetto/trace_event_data_source.cc +++ b/chromium/services/tracing/public/cpp/perfetto/trace_event_data_source.cc @@ -514,9 +514,11 @@ TraceEventDataSource::TraceEventDataSource() : DataSourceBase(mojom::kTraceEventDataSourceName), disable_interning_(base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kPerfettoDisableInterning)) { +#ifndef TOOLKIT_QT DCHECK(session_flags_.is_lock_free()) << "SessionFlags are not atomic! We rely on efficient lock-free look-up " "of the session flags when emitting a trace event."; +#endif g_trace_event_data_source_for_testing = this; DETACH_FROM_SEQUENCE(perfetto_sequence_checker_); } |