本文整理汇总了Python中build_options.OPTIONS.is_bionic_loader_logging方法的典型用法代码示例。如果您正苦于以下问题:Python OPTIONS.is_bionic_loader_logging方法的具体用法?Python OPTIONS.is_bionic_loader_logging怎么用?Python OPTIONS.is_bionic_loader_logging使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类build_options.OPTIONS
的用法示例。
在下文中一共展示了OPTIONS.is_bionic_loader_logging方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _add_runnable_ld_cflags
# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import is_bionic_loader_logging [as 别名]
def _add_runnable_ld_cflags(n):
n.add_c_flags('-std=gnu99')
if OPTIONS.is_arm():
# If we specify -fstack-protector, the ARM compiler emits code
# which requires relocation even for the code to be executed
# before the self relocation. We disable the stack smashing
# protector for the Bionic loader for now.
# TODO(crbug.com/342292): Enable stack protector for the Bionic
# loader on Bare Metal ARM.
n.add_compiler_flags('-fno-stack-protector')
n.add_compiler_flags(
'-ffunction-sections', '-fdata-sections',
# The loader does not need to export any symbols.
'-fvisibility=hidden',
'-W', '-Wno-unused', '-Wno-unused-parameter', '-Werror')
# TODO(crbug.com/243244): Consider using -Wsystem-headers.
n.add_include_paths('android/bionic/libc',
'android/bionic/libc/private',
'android/bionic/linker/arch/nacl')
if OPTIONS.is_debug_code_enabled() or OPTIONS.is_bionic_loader_logging():
n.add_defines('LINKER_DEBUG=1')
else:
n.add_defines('LINKER_DEBUG=0')
n.add_defines('ANDROID_SMP=1')
if OPTIONS.is_arm():
n.add_defines('ANDROID_ARM_LINKER')
elif OPTIONS.is_x86_64():
n.add_defines('ANDROID_X86_64_LINKER')
n.add_c_flags('-Wno-pointer-to-int-cast')
n.add_c_flags('-Wno-int-to-pointer-cast')
else:
n.add_defines('ANDROID_X86_LINKER')
if build_common.use_ndk_direct_execution():
n.add_defines('USE_NDK_DIRECT_EXECUTION')
if OPTIONS.is_bionic_loader_logging():
n.add_defines('BIONIC_LOADER_LOGGING')
_add_bare_metal_flags_to_ninja_generator(n)