# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
vespa_add_library(vespalib_vespalib_util OBJECT
    SOURCES
    adaptive_sequenced_executor.cpp
    address_space.cpp
    alloc.cpp
    approx.cpp
    array.cpp
    assert.cpp
    backtrace.cpp
    barrier.cpp
    benchmark_timer.cpp
    bfloat16.cpp
    binary_hamming_distance.cpp
    bits.cpp
    blockingthreadstackexecutor.cpp
    box.cpp
    cgroup_resource_limits.cpp
    classname.cpp
    compress.cpp
    compressor.cpp
    count_down_latch.cpp
    cpu_usage.cpp
    crc.cpp
    deadline.cpp
    destructor_callbacks.cpp
    detect_malloc_impl.cpp
    doom.cpp
    dual_merge_director.cpp
    error.cpp
    exception.cpp
    exceptions.cpp
    execution_profiler.cpp
    executor_idle_tracking.cpp
    fake_deadline.cpp
    fake_doom.cpp
    featureset.cpp
    file_area_freelist.cpp
    foregroundtaskexecutor.cpp
    gate.cpp
    gencnt.cpp
    generation.cpp
    generation_guard.cpp
    generation_hold.cpp
    generationhandler.cpp
    generationholder.cpp
    growablebytebuffer.cpp
    hdr_abort.cpp
    host_name.cpp
    invokeserviceimpl.cpp
    isequencedtaskexecutor.cpp
    issue.cpp
    jsonexception.cpp
    jsonstream.cpp
    jsonwriter.cpp
    kll_sketch.cpp
    landlock.cpp
    latch.cpp
    left_right_heap.cpp
    limited_thread_bundle_wrapper.cpp
    lz4compressor.cpp
    malloc_mmap_guard.cpp
    md5.c
    memory_trap.cpp
    memoryusage.cpp
    mimalloc_intercept.cpp
    mmap_file_allocator.cpp
    mmap_file_allocator_factory.cpp
    monitored_refcount.cpp
    nice.cpp
    normalize_class_name.cpp
    printable.cpp
    priority_queue.cpp
    process_memory_stats.cpp
    programoptions.cpp
    random.cpp
    ref_counted.cpp
    regexp.cpp
    relative_frequency_sketch.cpp
    require.cpp
    resource_limits.cpp
    round_up_to_page_size.cpp
    runnable.cpp
    runnable_pair.cpp
    rusage.cpp
    sequence.cpp
    sequencedtaskexecutor.cpp
    sequencedtaskexecutorobserver.cpp
    sha1.cpp
    shared_operation_throttler.cpp
    shared_string_repo.cpp
    shutdownguard.cpp
    sig_catch.cpp
    signalhandler.cpp
    simple_thread_bundle.cpp
    singleexecutor.cpp
    small_vector.cpp
    stash.cpp
    state_explorer_utils.cpp
    string_escape.cpp
    string_hash.cpp
    stringfmt.cpp
    testclock.cpp
    thread.cpp
    thread_bundle.cpp
    threadstackexecutor.cpp
    threadstackexecutorbase.cpp
    time.cpp
    transient_memory_tracker.cpp
    transient_vector_snapshot.cpp
    type_stable_vector.cpp
    typed_data_layout.cpp
    unordered_u32_set.cpp
    unwind_message.cpp
    valgrind.cpp
    xmlserializable.cpp
    xmlstream.cpp
    zstdcompressor.cpp
    DEPENDS
)

# Don't convert call to jump when returning a value from a function with
# a compatible stack.
set_source_files_properties(signalhandler.cpp PROPERTIES COMPILE_OPTIONS "-fno-optimize-sibling-calls")
