# NOTE(agallagher): The platform really should be responsible for providing
# this type of provided dependency.  As it is now, we need to setup dummy
# rules to model glibc's libraries.

# libpthread is implicitly included in the android runtime so, when building
# on an android platform, we don't do anything.
prebuilt_cxx_library(
  name = 'pthread',
  header_only = True,
  exported_platform_linker_flags = [
    ('android', []),
    ('default', ['-lpthread']),
    ('static', ['-lpthread']),
  ],
  visibility = [
    'PUBLIC',
  ],
)

prebuilt_cxx_library(
  name = 'dl',
  header_only = True,
  exported_linker_flags = [
    '-ldl',
  ],
  visibility = [
    'PUBLIC',
  ],
)

prebuilt_cxx_library(
  name = 'm',
  header_only = True,
  exported_linker_flags = [
    '-lm',
  ],
  visibility = [
    'PUBLIC',
  ],
)

prebuilt_cxx_library(
  name = 'rt',
  header_only = True,
  exported_platform_linker_flags = [
    ('android', []),  # Empty, since `-lc` is implicit
    ('default', ['-lrt']),
  ],
  visibility = [
      'PUBLIC',
  ],
)