当前位置: 首页>>代码示例>>Python>>正文


Python OPTIONS.is_x86_64方法代码示例

本文整理汇总了Python中src.build.build_options.OPTIONS.is_x86_64方法的典型用法代码示例。如果您正苦于以下问题:Python OPTIONS.is_x86_64方法的具体用法?Python OPTIONS.is_x86_64怎么用?Python OPTIONS.is_x86_64使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在src.build.build_options.OPTIONS的用法示例。


在下文中一共展示了OPTIONS.is_x86_64方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_chrome_prebuilt_arch_bits

# 需要导入模块: from src.build.build_options import OPTIONS [as 别名]
# 或者: from src.build.build_options.OPTIONS import is_x86_64 [as 别名]
def get_chrome_prebuilt_arch_bits():
    # Use 32-bit version of Chrome on Windows regardless of the target bit size.
    if platform_util.is_running_on_cygwin():
        return "32"
    elif OPTIONS.is_x86_64() or OPTIONS.is_bare_metal_i686():
        return "64"
    else:
        return "32"
开发者ID:nehz,项目名称:google-arc,代码行数:10,代码来源:build_common.py

示例2: get_art_isa

# 需要导入模块: from src.build.build_options import OPTIONS [as 别名]
# 或者: from src.build.build_options.OPTIONS import is_x86_64 [as 别名]
def get_art_isa():
    if OPTIONS.is_i686():
        return "x86"
    elif OPTIONS.is_x86_64():
        return "x86_64"
    elif OPTIONS.is_arm():
        return "arm"
    raise Exception("Unable to map target into an ART ISA: %s" % OPTIONS.target())
开发者ID:nehz,项目名称:google-arc,代码行数:10,代码来源:build_common.py

示例3: _filter_sources_for_openssl

# 需要导入模块: from src.build.build_options import OPTIONS [as 别名]
# 或者: from src.build.build_options.OPTIONS import is_x86_64 [as 别名]
def _filter_sources_for_openssl(vars):
  if OPTIONS.is_nacl_build():
    # Disable asm enabling defines.
    flags_to_remove = ['-DAES_ASM', '-DGHASH_ASM', '-DMD5_ASM',
                       '-DOPENSSL_BN_ASM_PART_WORDS', '-DOPENSSL_BN_ASM_GF2m',
                       '-DOPENSSL_BN_ASM_MONT', '-DOPENSSL_CPUID_OBJ',
                       '-DSHA1_ASM', '-DSHA256_ASM', '-DSHA512_ASM']
    cflags_to_add = ['-DOPENSSL_NO_ASM', '-DOPENSSL_NO_INLINE_ASM']
    _update_flags(vars, cflags_to_add, flags_to_remove)
    sources = vars.get_sources()
    # Drop asm sources, which don't work under NaCl for now. These asm files
    # are for i686 or x86_64.
    sources[:] = filter(lambda s: not s.endswith('.S') and '/asm/' not in s,
                        sources)
    # Build C implementations instead.
    replacement_sources = [
        'aes/aes_cbc.c',
        'aes/aes_core.c',
        'bn/bn_asm.c',
        'mem_clr.c']
    if OPTIONS.is_i686():
      replacement_sources.extend([
          'bf/bf_enc.c',
          'des/des_enc.c',
          'des/fcrypt_b.c'])
    if OPTIONS.is_x86_64():
      replacement_sources.extend([
          'rc4/rc4_enc.c',
          'rc4/rc4_skey.c'])
    for s in replacement_sources:
      sources.append(
          'android/external/chromium_org/third_party/openssl/openssl/crypto/'
          + s)
    if OPTIONS.is_x86_64():
      # Replace the sources that does not seem to work under NaCl x86_64.
      # Especially chacha_vec.c includes code that assumes the bit size of
      # size_t is 64 bit, which is not true under NaCl x86_64.
      sources.remove('android/external/chromium_org/third_party/openssl/'
                     'openssl/crypto/chacha/chacha_vec.c')
      sources.append('android/external/chromium_org/third_party/openssl/'
                     'openssl/crypto/chacha/chacha_enc.c')
      sources.remove('android/external/chromium_org/third_party/openssl/'
                     'openssl/crypto/poly1305/poly1305_vec.c')
      sources.append('android/external/chromium_org/third_party/openssl/'
                     'openssl/crypto/poly1305/poly1305.c')
开发者ID:epowers,项目名称:arc,代码行数:47,代码来源:config.py

示例4: _filter_sources_for_webkit_asm

# 需要导入模块: from src.build.build_options import OPTIONS [as 别名]
# 或者: from src.build.build_options.OPTIONS import is_x86_64 [as 别名]
def _filter_sources_for_webkit_asm(vars):
  # Add one arch-specific assembly.
  sources = vars.get_sources()
  path = os.path.join(vars.get_path(),
                      'third_party/WebKit/Source/platform/heap/asm')
  if OPTIONS.is_i686():
    sources.append(os.path.join(path, 'SaveRegisters_x86.S'))
  elif OPTIONS.is_x86_64():
    sources.append(os.path.join(path, 'SaveRegisters_x86_64.S'))
开发者ID:epowers,项目名称:arc,代码行数:11,代码来源:config.py

示例5: generate_test_ninjas

# 需要导入模块: from src.build.build_options import OPTIONS [as 别名]
# 或者: from src.build.build_options.OPTIONS import is_x86_64 [as 别名]
def generate_test_ninjas():
  if not OPTIONS.is_nacl_x86_64():
    return

  n = ninja_generator.TestNinjaGenerator('libunwind_test',
                                         base_path='android/external/libunwind',
                                         enable_cxx11=True)
  sources = []
  if OPTIONS.is_x86_64():
    sources.append('src/x86_64/ucontext_i_test.cc')
  n.build_default(sources)
  n.run(n.link())
开发者ID:epowers,项目名称:arc,代码行数:14,代码来源:config.py

示例6: _filter_libunwind

# 需要导入模块: from src.build.build_options import OPTIONS [as 别名]
# 或者: from src.build.build_options.OPTIONS import is_x86_64 [as 别名]
def _filter_libunwind(vars):
  # TODO(crbug.com/414569): L-rebase: Figure out why this is not here.
  # if OPTIONS.is_arm():
    # The same is implemented by unw_tdep_getcontext() in libunwind-arm.h.
    # vars.get_sources().remove(
    #     'android/external/libunwind/src/arm/getcontext.S')
  if OPTIONS.is_x86_64() and vars.is_target():
    # setcontext is used by unw_resume(), which we do not support.
    vars.get_sources().remove(
        'android/external/libunwind/src/x86_64/setcontext.S')
    # Gtrace.c caches requests to libunwind and is only implemented for x64,
    # most likely because only 64-bit compilation was removing frame pointers.
    # It cannot compile here because it uses __thread.
    vars.get_sources().remove(
        'android/external/libunwind/src/x86_64/Gtrace.c')
    vars.get_sources().remove(
        'android/external/libunwind/src/x86_64/Ltrace.c')
  return True
开发者ID:epowers,项目名称:arc,代码行数:20,代码来源:config.py

示例7: get_dex2oat_target_dependent_flags_map

# 需要导入模块: from src.build.build_options import OPTIONS [as 别名]
# 或者: from src.build.build_options.OPTIONS import is_x86_64 [as 别名]
def get_dex2oat_target_dependent_flags_map():
    # New flags added here might need to be accounted for in
    # src/build/generate_build_prop.py for runtime dex2oat to work properly.
    flags = {}
    if not OPTIONS.is_debug_info_enabled():
        flags["no-include-debug-symbols"] = ""

    if OPTIONS.is_i686():
        flags["instruction-set-features"] = "default"
        flags["instruction-set"] = "x86"
        flags["compiler-filter"] = "speed"
    elif OPTIONS.is_x86_64():
        flags["instruction-set-features"] = "default"
        flags["instruction-set"] = "x86_64"
        flags["compiler-filter"] = "space"
        flags["small-method-max"] = "30"
        flags["tiny-method-max"] = "10"
    elif OPTIONS.is_arm():
        flags["instruction-set-features"] = "div"
        flags["instruction-set"] = "arm"
        flags["compiler-filter"] = "everything"
    return flags
开发者ID:nehz,项目名称:google-arc,代码行数:24,代码来源:build_common.py

示例8: get_nacl_libgcc_dir

# 需要导入模块: from src.build.build_options import OPTIONS [as 别名]
# 或者: from src.build.build_options.OPTIONS import is_x86_64 [as 别名]
def get_nacl_libgcc_dir():
  dirname = 'x86_64-nacl' if OPTIONS.is_x86_64() else 'i686-nacl'
  return os.path.join(get_pnacl_system_dir(), 'lib', dirname)
开发者ID:epowers,项目名称:arc,代码行数:5,代码来源:toolchain.py

示例9: value

# 需要导入模块: from src.build.build_options import OPTIONS [as 别名]
# 或者: from src.build.build_options.OPTIONS import is_x86_64 [as 别名]
# Normally added upstream at android/build/core/main.mk. Services can restrict
# functionality based on this value (currently very few do).  Setting this
# value allows CtsOsTestCases:android.os.cts.BuildTest to pass.
secure = "0"
if build_common.get_build_type() == "user":
  secure = "1"
print 'ro.secure=' + secure

# The following three properties synchronize dex2oat's arguments at build time
# and runtime.
dex2oatFlags = build_common.get_dex2oat_target_dependent_flags_map()
print ('dalvik.vm.isa.' + build_common.get_art_isa() + '.features=' +
       dex2oatFlags['instruction-set-features'])
print 'dalvik.vm.dex2oat-filter=' + dex2oatFlags['compiler-filter']
if 'no-include-debug-symbols' in dex2oatFlags:
  print 'dalvik.vm.dex2oat-flags=--no-include-debug-symbols'

# This property tells dex2oat to compile x86 code even though we say in the
# ABI_LIST above that we only support ARM.
if OPTIONS.is_i686():
  print 'ro.dalvik.vm.isa.arm=x86'
if OPTIONS.is_x86_64():
  print 'ro.dalvik.vm.isa.arm=x86_64'

# When AOT is not enabled, make sure dex2oat does not run.
if not OPTIONS.enable_art_aot():
  print 'ro.arc.dex2oat.disabled=1'

print '# end build properties added by generate_build_prop.py'
开发者ID:epowers,项目名称:arc,代码行数:31,代码来源:generate_build_prop.py


注:本文中的src.build.build_options.OPTIONS.is_x86_64方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。