本文整理汇总了Python中build_options.OPTIONS.is_bare_metal_i686方法的典型用法代码示例。如果您正苦于以下问题:Python OPTIONS.is_bare_metal_i686方法的具体用法?Python OPTIONS.is_bare_metal_i686怎么用?Python OPTIONS.is_bare_metal_i686使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类build_options.OPTIONS
的用法示例。
在下文中一共展示了OPTIONS.is_bare_metal_i686方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _filter
# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import is_bare_metal_i686 [as 别名]
def _filter(vars):
if vars.is_shared():
return False
make_to_ninja.Filters.convert_to_shared_lib(vars)
_add_bare_metal_flags_to_make_to_ninja_vars(vars)
# Builtin rint and rintf call lrint and lrintf,
# respectively. However, Bionic calls rint and rintf to implement
# lrint and lrintf and this causes an infinite recurision.
# TODO(crbug.com/357564): Change this to -fno-builtin.
vars.get_cflags().append('-fno-builtin-rint')
vars.get_cflags().append('-fno-builtin-rintf')
sources = vars.get_sources()
_remove_assembly_source(sources)
if OPTIONS.is_arm():
vars.get_includes().append('android/bionic/libc/arch-arm/include')
else:
# TODO(crbug.com/414583): "L" has arch-x86_64 directory so we
# should have this include path only for i686 targets.
vars.get_includes().append('android/bionic/libc/arch-x86/include')
if OPTIONS.is_x86_64():
vars.get_includes().insert(0, 'android/bionic/libc/arch-amd64/include')
sources.remove(
'android/bionic/libm/upstream-freebsd/lib/msun/src/e_sqrtf.c')
sources.remove('android/bionic/libm/i387/fenv.c')
sources.extend(['android/bionic/libm/amd64/e_sqrtf.S',
'android/bionic/libm/amd64/fenv.c'])
if OPTIONS.is_bare_metal_i686():
# long double is double on other architectures. For them,
# s_nextafter.c defines nextafterl.
sources.append(
'android/bionic/libm/upstream-freebsd/lib/msun/src/s_nextafterl.c')
vars.get_generator_args()['is_system_library'] = True
vars.get_shared_deps().append('libc')
return True
示例2: _launch_bare_metal_gdbserver
# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import is_bare_metal_i686 [as 别名]
def _launch_bare_metal_gdbserver(chrome_pid):
# Currently we assume that, here we built -t=bi ARC. So, we use gdbserver32.
assert OPTIONS.is_bare_metal_i686()
plugin_pid = _get_bare_metal_plugin_pid(chrome_pid)
command = [
'gdbserver32', '--attach', ':%d' % _BARE_METAL_GDB_PORT, str(plugin_pid)]
gdb_process = subprocess.Popen(command)
_run_gdb_watch_thread(gdb_process)
示例3: _filter_libc_common_for_i686
# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import is_bare_metal_i686 [as 别名]
def _filter_libc_common_for_i686(vars, sources):
for f in _I686_ASM_FILES:
sources.append(_get_asm_source(f))
if OPTIONS.is_bare_metal_i686() and OPTIONS.enable_valgrind():
# SSE2 strchr may access address before the passed string when the
# string is not 16-byte aligned and valgrind complains.
sources.remove('android/bionic/libc/arch-x86/string/sse2-strchr-atom.S')
sources.append('android/bionic/libc/bionic/strchr.cpp')
if OPTIONS.is_bare_metal_build():
# For direct syscalls used internally.
sources.append('android/bionic/libc/arch-x86/bionic/syscall.S')
else:
# See the comment in _filter_libc_common_for_arm.
# TODO(crbug.com/318433): Use order-only dependencies.
vars.get_implicit_deps().append(_get_gen_source_stamp())
# It seems newlib's memset is slightly faster than the
# assembly implementation (0.16[sec/GB] vs 0.19[sec/GB]).
sources.append('nacl-newlib/newlib/libc/string/memset.c')
# This file contains inline assembly.
sources.remove('android/bionic/libc/arch-x86/bionic/__set_tls.c')
# TODO(crbug.com/268485): Confirm ARC can ignore non-SSSE3 x86 devices
vars.get_cflags().append('-DUSE_SSSE3=1')
示例4: _filter_libc_common
# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import is_bare_metal_i686 [as 别名]
def _filter_libc_common(vars):
sources = vars.get_sources()
_remove_assembly_source(sources)
# libc_common is used from both the loader and libc.so. Functions
# which are necessary for the bionic loader must be in this list.
sources.extend([
# TODO(crbug.com/243244): If possible, move arch-nacl/ files into a
# separate archive and build them with -Werror.
'android/bionic/libc/arch-nacl/bionic/__get_sp.c',
'android/bionic/libc/arch-nacl/bionic/__set_tls.c',
'android/bionic/libc/arch-nacl/bionic/clone.c',
'android/bionic/libc/arch-nacl/bionic/popcount.c',
'android/bionic/libc/arch-nacl/syscalls/__getcwd.c',
'android/bionic/libc/arch-nacl/syscalls/__open.c',
'android/bionic/libc/arch-nacl/syscalls/_exit.c',
'android/bionic/libc/arch-nacl/syscalls/_exit_thread.c',
'android/bionic/libc/arch-nacl/syscalls/clock_getres.c',
'android/bionic/libc/arch-nacl/syscalls/clock_gettime.c',
'android/bionic/libc/arch-nacl/syscalls/close.c',
'android/bionic/libc/arch-nacl/syscalls/dup.c',
'android/bionic/libc/arch-nacl/syscalls/dup2.c',
'android/bionic/libc/arch-nacl/syscalls/enosys.c',
'android/bionic/libc/arch-nacl/syscalls/fdatasync.c',
'android/bionic/libc/arch-nacl/syscalls/fstat.c',
'android/bionic/libc/arch-nacl/syscalls/fsync.c',
'android/bionic/libc/arch-nacl/syscalls/futex.c',
'android/bionic/libc/arch-nacl/syscalls/getdents.c',
'android/bionic/libc/arch-nacl/syscalls/getpid.c',
'android/bionic/libc/arch-nacl/syscalls/gettid.c',
'android/bionic/libc/arch-nacl/syscalls/gettimeofday.c',
'android/bionic/libc/arch-nacl/syscalls/getuid.c',
'android/bionic/libc/arch-nacl/syscalls/lseek.c',
'android/bionic/libc/arch-nacl/syscalls/lseek64.c',
'android/bionic/libc/arch-nacl/syscalls/lstat.c',
'android/bionic/libc/arch-nacl/syscalls/mmap.c',
'android/bionic/libc/arch-nacl/syscalls/mprotect.c',
'android/bionic/libc/arch-nacl/syscalls/munmap.c',
'android/bionic/libc/arch-nacl/syscalls/nacl_stat.c',
'android/bionic/libc/arch-nacl/syscalls/nacl_timespec.c',
'android/bionic/libc/arch-nacl/syscalls/nacl_timeval.c',
'android/bionic/libc/arch-nacl/syscalls/read.c',
'android/bionic/libc/arch-nacl/syscalls/stat.c',
'android/bionic/libc/arch-nacl/syscalls/unlink.c',
'android/bionic/libc/arch-nacl/syscalls/write.c',
'android/bionic/libc/arch-nacl/syscalls/writev.c',
'android/bionic/libc/arch-nacl/tmp/raw_print.c',
# TODO(crbug.com/352917): Use assembly version on Bare Metal ARM.
'android/bionic/libc/bionic/memcmp.c',
'android/bionic/libc/bionic/memcpy.c',
'android/bionic/libc/bionic/property_service.c',
'android/bionic/libc/string/ffs.c',
'android/bionic/libc/string/strcat.c',
'android/bionic/libc/string/strcmp.c',
'android/bionic/libc/string/strlen.c'])
if OPTIONS.is_nacl_build():
# They define SFI NaCl specific functions for dynamic code.
sources.extend([
'android/bionic/libc/arch-nacl/syscalls/__allocate_nacl_dyncode.c',
'android/bionic/libc/arch-nacl/syscalls/nacl_dyncode_create.c',
'android/bionic/libc/arch-nacl/syscalls/nacl_dyncode_delete.c',
'android/bionic/libc/arch-nacl/syscalls/nacl_list_mappings.c'])
if OPTIONS.is_arm():
# TODO(crbug.com/352917): Use assembly version on Bare Metal ARM.
sources.extend([
'android/bionic/libc/bionic/__memcpy_chk.cpp',
'android/bionic/libc/bionic/__memset_chk.cpp',
'android/bionic/libc/bionic/__strcat_chk.cpp',
'android/bionic/libc/bionic/__strcpy_chk.cpp'])
else:
sources.extend([
'android/bionic/libc/bionic/memchr.c',
'android/bionic/libc/bionic/memrchr.c',
'android/bionic/libc/bionic/memmove.c',
'android/bionic/libc/bionic/strnlen.c',
'android/bionic/libc/string/bcopy.c',
'android/bionic/libc/string/index.c',
'android/bionic/libc/string/strncmp.c',
'android/bionic/libc/string/strrchr.c',
'android/bionic/libc/upstream-freebsd/lib/libc/string/wcschr.c',
'android/bionic/libc/upstream-freebsd/lib/libc/string/wcsrchr.c',
'android/bionic/libc/upstream-freebsd/lib/libc/string/wcscmp.c',
'android/bionic/libc/upstream-freebsd/lib/libc/string/wcslen.c'])
if OPTIONS.is_arm():
_filter_libc_common_for_arm(vars, sources)
elif OPTIONS.is_i686():
_filter_libc_common_for_i686(vars, sources)
elif OPTIONS.is_x86_64():
_filter_libc_common_for_x86_64(vars, sources)
# NaCl does not have fork so we do not need the fork wrapper
# which does preparation before we actually run fork system call.
sources.remove('android/bionic/libc/bionic/fork.c')
# lseek64 in this file splits off64_t into two integer values to
# make assembly code easier. We can define lseek64 in C so we do
# not need this wrapper.
sources.remove('android/bionic/libc/bionic/lseek64.c')
if OPTIONS.is_x86_64() or OPTIONS.is_bare_metal_i686():
# We define __get_tls in nacl_read_tp.c.
#.........这里部分代码省略.........