[libc] Breakup freelist_malloc into separate files (#119806)
This better matches the structure we use for the rest of libc.
This commit is contained in:
@@ -24,10 +24,21 @@ add_libc_fuzzer(
|
||||
-D__LIBC_EXPLICIT_SIMD_OPT
|
||||
)
|
||||
|
||||
add_libc_fuzzer(
|
||||
freelist_heap_fuzz
|
||||
SRCS
|
||||
freelist_heap_fuzz.cpp
|
||||
DEPENDS
|
||||
libc.src.__support.freelist_heap
|
||||
)
|
||||
if(LLVM_LIBC_FULL_BUILD)
|
||||
add_libc_fuzzer(
|
||||
freelist_heap_fuzz
|
||||
SRCS
|
||||
fake_heap.s
|
||||
freelist_heap_fuzz.cpp
|
||||
DEPENDS
|
||||
libc.src.__support.freelist_heap
|
||||
)
|
||||
# TODO(#119995): Remove this once sccache on Windows no longer requires
|
||||
# the use of -DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded.
|
||||
get_fq_target_name(freelist_heap_fuzz freelist_heap_fuzz_target_name)
|
||||
set_target_properties(
|
||||
${freelist_heap_fuzz_target_name}
|
||||
PROPERTIES
|
||||
MSVC_DEBUG_INFORMATION_FORMAT ""
|
||||
)
|
||||
endif()
|
||||
|
||||
15
libc/fuzzing/__support/fake_heap.s
Normal file
15
libc/fuzzing/__support/fake_heap.s
Normal file
@@ -0,0 +1,15 @@
|
||||
//===-- Test fake definition for heap symbols -----------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
.globl _end, __llvm_libc_heap_limit
|
||||
|
||||
.bss
|
||||
_end:
|
||||
.fill 1024
|
||||
__llvm_libc_heap_limit:
|
||||
|
||||
Reference in New Issue
Block a user