| # Copyright 2024 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") |
| |
| llvm_libc_source_set("strings") { |
| functions = [ |
| "strcasecmp", |
| "strncasecmp", |
| ] |
| |
| deps = [ ":compat" ] |
| } |
| |
| llvm_libc_source_set("compat") { |
| functions = [ |
| "bcmp", |
| "bcopy", |
| "bzero", |
| "index", |
| "rindex", |
| ] |
| |
| deps = [ ":swab" ] |
| } |
| |
| # This lives in libc/src/unistd upstream because it's declared in <unistd.h> |
| # but it's really a compat string function, so we include it here instead. |
| llvm_libc_source_set("swab") { |
| dir = "unistd" |
| functions = [ "swab" ] |
| } |
| |
| # This provides an archive library of the universally safe string functions. |
| # When built outside the "user.libc" environment, these always define only |
| # hidden-visibility symbols and should be safe in any build environment. |
| static_library("hermetic") { |
| complete_static_lib = true |
| deps = [ ":compat" ] |
| } |