| # Copyright 2022 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_group("stdlib") { |
| deps = [ ":generic" ] |
| if (is_fuchsia) { |
| deps += [ ":_Exit" ] |
| } |
| } |
| |
| llvm_libc_source_set("generic") { |
| functions = [ |
| "abs", |
| "atoi", |
| "atol", |
| "atoll", |
| "bsearch", |
| "div", |
| "labs", |
| "ldiv", |
| "llabs", |
| "lldiv", |
| "strtol", |
| "strtoll", |
| "strtoul", |
| "strtoull", |
| "qsort", |
| ] |
| |
| deps = [ ":abort" ] |
| } |
| |
| llvm_libc_source_set("abort") { |
| functions = [ "abort" ] |
| os_functions = functions |
| local_deps = [ "//zircon/system/ulib/zircon-internal" ] |
| } |
| |
| if (is_fuchsia) { |
| llvm_libc_source_set("_Exit") { |
| functions = [ "_Exit" ] |
| os_functions = functions |
| no_test_functions = functions |
| local_deps = [ "//src/zircon/lib/zircon" ] |
| } |
| } |
| |
| # This provides an archive library of the universally safe stdlib 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 = [ ":generic" ] |
| } |