load("//buck/rules:cc.bzl", "cc_header_root", "cc_objects") load("//buck/rules:files.bzl", "export_file") # Targets over the libmalloc pin, materialized by scripts/buck-src.nu. The tree # itself is gitignored (content is pinned in nix/submodules.json); this file is # committed. One package per pin keeps what the Nix-lowered path has to parse # small enough to evaluate (plan/buck2-port.md phase 3). # BEGIN generated: system_malloc_obj # GENERATED from the reference build.ninja by # gen-buck-from-ninja (deleted) system_malloc_obj -- review before committing. # cmake target: system_malloc_obj -> src/external/libmalloc/system_malloc_obj # 19 sources in 2 flag groups: cmake gives individual # files their own defines and -include shims, and those decide symbol aliasing. cc_header_root( name = "system_malloc_inc_include_malloc", headers = glob(["include/malloc/*.h", "include/malloc/**/*.h"]), root = "include/malloc", visibility = ["PUBLIC"], ) cc_header_root( name = "system_malloc_inc_private", headers = glob(["private/*.h", "private/**/*.h"]), root = "private", visibility = ["PUBLIC"], ) cc_header_root( name = "system_malloc_inc_include", headers = glob(["include/*.h", "include/**/*.h"]), root = "include", visibility = ["PUBLIC"], ) cc_header_root( name = "system_malloc_inc_resolver", headers = glob(["resolver/*.h", "resolver/**/*.h"]), root = "resolver", visibility = ["PUBLIC"], ) cc_objects( name = "system_malloc_obj", srcs = [ "src/bitarray.c", "src/frozen_malloc.c", "src/legacy_malloc.c", "src/magazine_large.c", "src/magazine_malloc.c", "src/magazine_medium.c", "src/magazine_rack.c", "src/magazine_small.c", "src/magazine_tiny.c", "src/malloc.c", "src/malloc_common.c", "src/malloc_printf.c", "src/msl_lite_support.c", "src/nano_malloc.c", "src/nano_malloc_common.c", "src/pguard_malloc.c", "src/purgeable_malloc.c", "src/vm.c", ], compiler_flags = [ "-DOS_UNFAIR_LOCK_INLINE=1", "-DPRIVATE", "-D_LIBC_NO_FEATURE_VERIFICATION", "-D__DARWIN_UNIX03", "-nostdinc", ], toolchain = "toolchains//:darwin_cc", deps = [ "//src/darwin:sdk_env", ":system_malloc_inc_include_malloc", ":system_malloc_inc_private", ":system_malloc_inc_include", ":system_malloc_inc_resolver", ], visibility = ["PUBLIC"], ) cc_objects( name = "system_malloc_obj2", srcs = [ "src/nanov2_malloc.c", ], compiler_flags = [ "-DOS_UNFAIR_LOCK_INLINE=1", "-DPRIVATE", "-D_LIBC_NO_FEATURE_VERIFICATION", "-D__DARWIN_UNIX03", "-nostdinc", "-DOS_VARIANT_NOTRESOLVED=1", "-DOS_VARIANT_RESOLVED=1", ], toolchain = "toolchains//:darwin_cc", deps = [ "//src/darwin:sdk_env", ":system_malloc_inc_include_malloc", ":system_malloc_inc_private", ":system_malloc_inc_include", ":system_malloc_inc_resolver", ], visibility = ["PUBLIC"], ) # END generated: system_malloc_obj # BEGIN generated: pin exports load("//buck/generated:exports_libmalloc.bzl", "EXPORTS") # One export_file per file another package names by label, from the list # cider-exports keeps. [ export_file(name = _n, src = _s, visibility = ["PUBLIC"]) for _n, _s in EXPORTS.items() ] # END generated: pin exports