# Copyright 2026 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

component("platform_runtime") {
  defines = [ "IS_PLATFORM_RUNTIME_IMPL" ]
  sources = [
    "platform_runtime_impl.cc",
    "platform_runtime_impl.h",
  ]
  deps = [
    "//base",
    "//net",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [ "platform_runtime_impl_unittest.cc" ]
  deps = [
    ":platform_runtime",
    "//base",
    "//testing/gtest",
  ]
  data_deps = [ ":platform_runtime_test_lib" ]
}

# TODO(quarz): Use loadble_module everwhere & change GetNativeLibraryName()
#     to GetLoadableModuleName().

if (is_mac) {
  _target_type = "shared_library"
} else {
  _target_type = "loadable_module"
}

target(_target_type, "platform_runtime_test_lib") {
  testonly = true
  sources = [ "platform_runtime_test_lib.cc" ]
  deps = [ "//base:compiler_specific" ]
}
