| # Copyright 2020 The Fuchsia Authors |
| # |
| # Use of this source code is governed by a MIT-style |
| # license that can be found in the LICENSE file or at |
| # https://opensource.org/licenses/MIT |
| |
| import("//build/zircon/migrated_targets.gni") |
| |
| zx_library("ktl") { |
| kernel = true |
| static = false |
| |
| sources = [ "dummy-new.cc" ] |
| |
| public_configs = [ ":ktl.config" ] |
| |
| deps = [ "//zircon/kernel/lib/libc" ] |
| } |
| |
| config("ktl.config") { |
| visibility = [ |
| ":*", |
| |
| # TODO(fxbug.dev/44971): Referenced in environment configs. |
| "//build/config/fuchsia:*", |
| "//build/config/sanitizers:*", |
| "//zircon/kernel/*", |
| "//zircon/system/ulib/*", |
| "//zircon/third_party/lib/*", |
| "//zircon/third_party/ulib/*", |
| ] |
| |
| defines = [ |
| # This tells the headers not to use `extern template` declarations that |
| # expect specific instantiations/specializations to come from the libc++ |
| # library rather than the headers. In the kernel, only the headers are |
| # ever going to be available. |
| "_LIBCPP_DISABLE_EXTERN_TEMPLATE", |
| |
| # This tells <atomic> not to use threading APIs. |
| "_LIBCPP_HAS_NO_PLATFORM_WAIT", |
| |
| # This tells <atomic> et al to use <__external_threading> instead |
| # of expecting either POSIX or C11 threading APIs. |
| "_LIBCPP_HAS_THREAD_API_EXTERNAL", |
| "_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL", |
| |
| # Enable C++20 library APIs even in C++17. |
| "_LIBCPP_STD_VER=20", |
| ] |
| } |