1# Copyright 2023 The Pigweed Authors 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); you may not 4# use this file except in compliance with the License. You may obtain a copy of 5# the License at 6# 7# https://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12# License for the specific language governing permissions and limitations under 13# the License. 14 15import("//build_overrides/pigweed.gni") 16import("$dir_pw_build/cc_library.gni") 17import("$dir_pw_docgen/docs.gni") 18import("$dir_pw_third_party/llvm_libcxx/llvm_libcxx.gni") 19import("$dir_pw_unit_test/test.gni") 20 21if (dir_pw_third_party_llvm_libcxx != "") { 22 config("pw_libcxx_config") { 23 include_dirs = [ 24 "include", 25 "$dir_pw_third_party_llvm_libcxx/include", 26 ] 27 } 28 29 pw_static_library("pw_libcxx") { 30 complete_static_lib = true 31 add_global_link_deps = false 32 public_configs = [ ":pw_libcxx_config" ] 33 sources = [ 34 "__cxa_deleted_virtual.cc", 35 "__cxa_pure_virtual.cc", 36 "operator_delete.cc", 37 "operator_new.cc", 38 "verbose_abort.cc", 39 ] 40 remove_public_deps = [ dir_pw_libcxx ] 41 } 42 43 pw_test("operator_new_test") { 44 sources = [ "operator_new_test.cc" ] 45 } 46} else { 47 pw_static_library("pw_libcxx") { 48 add_global_link_deps = false 49 remove_public_deps = [ dir_pw_libcxx ] 50 } 51} 52 53pw_test_group("tests") { 54} 55 56pw_doc_group("docs") { 57 sources = [ "docs.rst" ] 58} 59