本文整理汇总了Python中src.build.build_options.OPTIONS.is_nacl_x86_64方法的典型用法代码示例。如果您正苦于以下问题:Python OPTIONS.is_nacl_x86_64方法的具体用法?Python OPTIONS.is_nacl_x86_64怎么用?Python OPTIONS.is_nacl_x86_64使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类src.build.build_options.OPTIONS
的用法示例。
在下文中一共展示了OPTIONS.is_nacl_x86_64方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _filter_cflags_for_chromium_org
# 需要导入模块: from src.build.build_options import OPTIONS [as 别名]
# 或者: from src.build.build_options.OPTIONS import is_nacl_x86_64 [as 别名]
def _filter_cflags_for_chromium_org(vars):
append_cflags = []
# TODO(http://crbug.com/509945): Use Gold once it's ready.
strip_flags = ['-fuse-ld=gold', '-march=pentium4', '-finline-limit=64']
if OPTIONS.is_arm():
# ARM clang does not support these flags.
strip_flags.extend(['-fno-partial-inlining', '-fno-early-inlining',
'-fno-tree-copy-prop', '-fno-tree-loop-optimize',
'-fno-move-loop-invariants',
'-Wa,-mimplicit-it=always'])
if not OPTIONS.is_bare_metal_build():
# nacl-clang supports -Oz, which is more aggressive than -Os.
strip_flags.append('-Os')
# TODO(crbug.com/346783): Remove this once we NaCl'ize PageAllocator.cpp.
# It is only necessary for NaCl, but we do this for linux as well
# to minimize platform differences.
append_cflags.append('-DMEMORY_TOOL_REPLACES_ALLOCATOR')
_update_flags(vars, append_cflags, strip_flags)
# -finline-limit=32 experimentally provides the smallest binary across
# the ni and nx targets. Also specify -finline-functions so all functions
# are candidates for inlining.
size_opts = ['-finline-limit=32', '-finline-functions']
if not OPTIONS.is_bare_metal_build():
# -Oz is not valid for asmflags, so just add it for C and C++.
vars.get_conlyflags().append('-Oz')
vars.get_cxxflags().append('-Oz')
# With these flags, compilers will not emit .eh_frame* sections and
# the size of libwebviewchromium.so reduces from 84MB to 75MB on L.
# As these options disables libgcc's _Unwind_Backtrace, we keep
# using them for non-production build. Note GDB and breakpad can
# produce backtraces without .eh_frame.
#
# It is intentional this condition is inconsistent with
# ninja_generator.py and make_to_ninja.py. Removing .eh_frame from
# production binary did not make a significant difference for file
# size of L. We would rather prefer keeping .eh_frame for
# _Unwind_Backtrace.
if not OPTIONS.is_debug_code_enabled():
size_opts += ['-fno-unwind-tables', '-fno-asynchronous-unwind-tables']
vars.get_cflags()[:] = vars.get_cflags() + size_opts
# dlopen fails for the following undefined reference without -mthumb
# _ZN7WebCore26feLightingConstantsForNeonEv
# TODO(crbug.com/358333): Investigate if this is actually needed.
if OPTIONS.is_arm():
vars.get_cflags().append('-mthumb')
# OpenSSL makes wrong assumption that sizeof(long) == 8 under x86_64.
# Remove the x86_64-specific include path to fall back to x86 config.
# Note that this include path is set in many modules depending on OpenSSL,
# not limited to third_party_openssl_openssl_gyp.a itself.
if OPTIONS.is_nacl_x86_64():
openssl_x64_include = (
'android/external/chromium_org/third_party/openssl/config/x64')
includes = vars.get_includes()
if openssl_x64_include in includes:
includes.remove(openssl_x64_include)
示例2: generate_test_ninjas
# 需要导入模块: from src.build.build_options import OPTIONS [as 别名]
# 或者: from src.build.build_options.OPTIONS import is_nacl_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())
示例3: _filter
# 需要导入模块: from src.build.build_options import OPTIONS [as 别名]
# 或者: from src.build.build_options.OPTIONS import is_nacl_x86_64 [as 别名]
def _filter(vars):
if vars.is_host() or vars.is_shared():
return False
if vars.get_module_name() not in ('libjemalloc',
'libjemalloc_jet',
'libjemalloc_unittest',
'libjemalloc_integrationtest'):
return False
if vars.get_module_name() != 'libjemalloc':
# All the other modules are only used in tests.
vars.set_instances_count(0)
# x86_64-nacl-gcc miscompiles malloc_conf_next in --opt mode.
# 'malloc_conf_next' that parses configuration value trying to
# parse key-value pair of "abort:true,..."
# expected result: key=abort, value=true
# parsed as: key=abort, value= and the rest gets misparsed.
# https://code.google.com/p/nativeclient/issues/detail?id=4036
if OPTIONS.is_nacl_x86_64():
vars.enable_clang()
vars.enable_cxx11()
if OPTIONS.enable_jemalloc_debug():
vars.get_cflags().append('-DJEMALLOC_DEBUG')
return True
示例4: filter_params_for_harfbuzz
# 需要导入模块: from src.build.build_options import OPTIONS [as 别名]
# 或者: from src.build.build_options.OPTIONS import is_nacl_x86_64 [as 别名]
def filter_params_for_harfbuzz(vars):
if OPTIONS.is_nacl_x86_64() and not OPTIONS.is_optimized_build():
# To work around nativeclient:3844, use -O1 even when --opt is not
# specified.
# TODO(nativeclient:3844): Remove this.
vars.get_cflags().append("-O1")