| # Copyright 2025 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("../libc.gni") |
| |
| # This will go into the new libc.so, but will never go into the legacy libc.so |
| # and so is not in the $components list in ../BUILD.gn. |
| llvm_libc_source_set("link") { |
| functions = [ "dl_iterate_phdr" ] |
| os_functions = functions |
| |
| # dl_iterate_phdr doesn't have a test in $llvm_libc/test, and the test here |
| # is specific to the //sdk/lib/ld-based implementation. |
| test_dir = "." |
| |
| deps = [ "../ld:ld-abi" ] |
| local_deps = [ |
| "..:weak", |
| "../dlfcn:dlfcn-abi", |
| "//sdk/lib/ld:headers", |
| ] |
| |
| test_deps = [ "../dlfcn/dl/test:module-phdr-info" ] |
| } |
| |
| # This is pulled into the separate ../dlfcn:dlfcn-abi-tests binary. |
| # It never needs to go into a boot test, so it can use gtest. |
| libc_test("dlfcn-abi-tests") { |
| sources = [ "dl_iterate_phdr-dlfcn-abi-tests.cc" ] |
| gtest = true |
| deps = [ |
| ":link.testonly", |
| "..:asm-linkage", |
| "../dlfcn:dlfcn-abi", |
| ] |
| } |