本文整理汇总了Python中src.build.build_options.OPTIONS.is_posix_translation_debug方法的典型用法代码示例。如果您正苦于以下问题:Python OPTIONS.is_posix_translation_debug方法的具体用法?Python OPTIONS.is_posix_translation_debug怎么用?Python OPTIONS.is_posix_translation_debug使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类src.build.build_options.OPTIONS
的用法示例。
在下文中一共展示了OPTIONS.is_posix_translation_debug方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _generate_libposix_translation
# 需要导入模块: from src.build.build_options import OPTIONS [as 别名]
# 或者: from src.build.build_options.OPTIONS import is_posix_translation_debug [as 别名]
def _generate_libposix_translation():
compiler_flags = [
'-Werror', '-fvisibility=hidden', '-fvisibility-inlines-hidden']
n = ninja_generator.ArchiveNinjaGenerator(
'libposix_translation_static',
# libart-gtest and libposix_translation need this
force_compiler='clang',
enable_cxx11=True)
n.add_compiler_flags(*compiler_flags)
if OPTIONS.is_posix_translation_debug():
n.add_defines('DEBUG_POSIX_TRANSLATION')
if OPTIONS.use_verbose_memory_viewer():
n.add_defines('USE_VERBOSE_MEMORY_VIEWER')
# For functions in chromium_org/base/ and private headers in ppapi/.
# TODO(crbug.com/234789): Use public API so that we can depend on
# nacl_pepper_path instead.
n.add_ppapi_compile_flags()
n.add_libchromium_base_compile_flags()
all_files = build_common.find_all_files(['src/posix_translation'],
['.cc'])
n.build_default(all_files).archive()
n = ninja_generator.SharedObjectNinjaGenerator(
'libposix_translation',
is_system_library=True,
force_compiler='clang',
enable_cxx11=True)
n.add_library_deps('libc.so', 'libm.so', 'libdl.so', 'libstlport.so')
n.add_whole_archive_deps('libposix_translation_static.a')
# Statically link libchromium_base.a so that we can use unwrapped version of
# the library.
# TODO(crbug.com/423063, crbug.com/336316): Statically link libcommon.a into
# the DSO too for more safety.
n.add_library_deps('libchromium_base.a')
n.add_compiler_flags(*compiler_flags)
n.add_ppapi_link_flags()
n.build_default([]).link()