本文整理汇总了Python中build_options.OPTIONS.is_debug_info_enabled方法的典型用法代码示例。如果您正苦于以下问题:Python OPTIONS.is_debug_info_enabled方法的具体用法?Python OPTIONS.is_debug_info_enabled怎么用?Python OPTIONS.is_debug_info_enabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类build_options.OPTIONS
的用法示例。
在下文中一共展示了OPTIONS.is_debug_info_enabled方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _generate_runnable_ld_ninja
# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import is_debug_info_enabled [as 别名]
def _generate_runnable_ld_ninja():
linker_script = _generate_linker_script_for_runnable_ld()
# Not surprisingly, bionic's loader is built with a special hack to
# Android's build system so we cannot use MakefileNinjaTranslator.
n = ninja_generator.ExecNinjaGenerator('runnable-ld.so',
base_path='android/bionic/linker',
install_path='/lib',
is_system_library=True)
_add_runnable_ld_cflags(n)
n.add_library_deps('libc_bionic_linker.a') # logging functions
n.add_library_deps('libc_common_linker.a')
n.add_library_deps('libc_freebsd_linker.a') # __swsetup etc.
sources = n.find_all_sources()
sources.extend(['android/bionic/libc/arch-nacl/syscalls/irt_syscalls.c',
'android/bionic/libc/bionic/__errno.c',
'android/bionic/libc/bionic/pthread.c',
'android/bionic/libc/bionic/pthread_create.cpp',
'android/bionic/libc/bionic/pthread_internals.cpp',
'android/bionic/libc/bionic/pthread_key.cpp'])
if OPTIONS.is_bare_metal_build():
# Remove SFI NaCl specific dynamic code allocation.
sources.remove('android/bionic/linker/arch/nacl/nacl_dyncode_alloc.c')
sources.remove('android/bionic/linker/arch/nacl/nacl_dyncode_map.c')
_remove_assembly_source(sources)
# NaCl has no signals so debugger support cannot be implemented.
sources.remove('android/bionic/linker/debugger.cpp')
# n.find_all_sources() picks up this upstream file regardless of the
# current target. For ARM, the file is obviously irrelevant. For i686
# and x86_64, we use our own begin.c.
sources.remove('android/bionic/linker/arch/x86/begin.c')
ldflags = n.get_ldflags()
if OPTIONS.is_nacl_build():
ldflags += (' -T ' + linker_script +
' -Wl,-Ttext,' + _LOADER_TEXT_SECTION_START_ADDRESS)
else:
# We need to use recent linkers for __ehdr_start.
ldflags += ' -pie'
# See the comment in linker/arch/nacl/begin.c.
ldflags += ' -Wl,--defsym=__linker_base=0'
# --gc-sections triggers an assertion failure in GNU ld for ARM for
# --opt build. The error message is very similar to the message in
# https://sourceware.org/bugzilla/show_bug.cgi?id=13990
# Once NaCl team updates the version of their binutils, we might be
# able to remove this.
if not OPTIONS.is_arm():
ldflags += ' -Wl,--gc-sections'
if not OPTIONS.is_debug_info_enabled():
ldflags += ' -Wl,--strip-all'
n.add_library_deps(*ninja_generator.get_libgcc_for_bionic())
n.add_library_deps('libbionic_ssp.a')
n.build_default(sources, base_path=None)
n.link(variables={'ldflags': ldflags}, implicit=linker_script)
示例2: generate_binaries_depending_ninjas
# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import is_debug_info_enabled [as 别名]
def generate_binaries_depending_ninjas(_):
if (not OPTIONS.is_nacl_x86_64() or
not OPTIONS.is_optimized_build() or
# emugl has a different set of static initializers than
# graphics_translation.
OPTIONS.enable_emugl() or
# None of the targets analyzed are currently built in the open source
# repository.
open_source.is_open_source_repo() or
# Run the checker only when --disable-debug-code is specified. Locations
# of static initializers differ depending on the debug-code option.
OPTIONS.is_debug_code_enabled() or
# The checker only works with debug symbols.
not OPTIONS.is_debug_info_enabled()):
# The static analysis tool's output varies between debug and non-debug
# builds, so we pick non-debug as the default.
return
n = ninja_generator.NinjaGenerator('analyze_static_initializers')
script = staging.as_staging(
'android/external/chromium_org/tools/linux/dump-static-initializers.py')
n.rule('analyze_static_initializers',
command=('python %s -d $in | head --lines=-1 | '
'egrep -ve \'^# .*\.cpp \' |'
'sed -e \'s/ T\.[0-9]*/ T.XXXXX/\' |'
'diff -u $expect - && touch $out' %
script),
description='analyze_static_initializers $in')
libraries = build_common.CHECKED_LIBRARIES
libraries_fullpath = [
os.path.join(build_common.get_load_library_path(), lib)
for lib in libraries]
for library in zip(libraries, libraries_fullpath):
# You can manually update the text files by running
# src/build/update_static_initializer_expectations.py.
expect = 'src/build/dump-static-initializers-%s-expected.txt' % library[0]
result_path = os.path.join(build_common.get_build_dir(),
'dump_static_initializers',
'dump_static_initializers.%s.result' %
library[0])
n.build(result_path, 'analyze_static_initializers', library[1],
variables={'out': result_path, 'expect': expect},
# Add |libraries_fullpath| to implicit= not to run the analyzer
# script until all libraries in |libraries_fullpath| become ready.
# This makes it easy to use
# update_static_initializer_expectations.py especially when you
# remove global variables from two or more libraries at the same
# time.
implicit=[script, expect] + libraries_fullpath)
示例3: _parse_args
# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import is_debug_info_enabled [as 别名]
parser.add_argument('-o', '--output',
default=build_common.get_test_bundle_name(),
help=('The name of the test bundle to be created.'))
return parser.parse_args()
if __name__ == '__main__':
OPTIONS.parse_configure_file()
# Build arc runtime.
build_common.run_ninja()
# Prepare all the files needed to run integration tests.
parsed_args = _parse_args()
integration_tests_args = _get_integration_tests_args(parsed_args.jobs)
run_integration_tests.set_test_options(integration_tests_args)
run_integration_tests.set_test_config_flags(integration_tests_args)
assert run_integration_tests.prepare_suites(integration_tests_args)
# Prepare dalvik.401-perf for perf vm tests.
integration_tests_args.include_patterns = ['dalvik.401-perf:*']
assert run_integration_tests.prepare_suites(integration_tests_args)
# Archive all the files needed to run integration tests into a zip file.
paths = _get_archived_file_paths()
if OPTIONS.is_debug_info_enabled():
paths = _strip_binaries(paths)
print 'Creating %s' % parsed_args.output
_zip_files(parsed_args.output, paths)
print 'Done'