• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python conf.mkspec_add_common_flag函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中waflib.Configure.conf.mkspec_add_common_flag函数的典型用法代码示例。如果您正苦于以下问题:Python mkspec_add_common_flag函数的具体用法?Python mkspec_add_common_flag怎么用?Python mkspec_add_common_flag使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: cxx_crosslinux_gxx46_x86

def cxx_crosslinux_gxx46_x86(conf):
    """
    Detect and setup the g++ 4.6 cross-compiler for 32-bit Linux
    """
    conf.mkspec_gxx_configure(4, 6, 'crosslinux-gxx46-x86')
    conf.mkspec_add_common_flag('-m32')
    # Note: libstdc++ might not be available on the target platform
    # Statically link the GCC runtime and the C++ standard library
    conf.env['LINKFLAGS'] += ['-static-libgcc', '-static-libstdc++']
开发者ID:GOPRO1955,项目名称:external-waf-tools,代码行数:9,代码来源:gxx_mkspecs.py


示例2: cxx_android5_gxx49_x86

def cxx_android5_gxx49_x86(conf):
    """
    Detect and setup the Android 5.0+ g++ 4.9 compiler for x86
    """
    conf.cxx_android_gxx49_x86()
    # Only position independent executables (PIE) are supported on Android 5
    # and above. The oldest version that can run a PIE binary is Android 4.1,
    # so the binary will segfault on all older platforms.
    conf.mkspec_add_common_flag('-fPIE')
    conf.env['LINKFLAGS'] += ['-pie']
开发者ID:steinwurf,项目名称:waf-tools,代码行数:10,代码来源:gxx_mkspecs.py


示例3: cxx_apple_llvm100_x64

def cxx_apple_llvm100_x64(conf):
    """
    Detect and setup the 64-bit Apple LLVM 10.0 compiler
    """
    if conf.is_mkspec_platform('mac'):
        conf.mkspec_clang_configure(10, 0)
        conf.mkspec_add_common_flag('-m64')
    else:
        conf.fatal("This mkspec is not supported on {0}.".format(
            conf.get_mkspec_platform()))
开发者ID:steinwurf,项目名称:waf-tools,代码行数:10,代码来源:clang_mkspecs.py


示例4: cxx_apple_llvm42_x64

def cxx_apple_llvm42_x64(conf):
    """
    Detect and setup the 64-bit Apple llvm 4.2 compiler (clang 3.2)
    """
    if conf.is_mkspec_platform('mac'):
        conf.mkspec_clang_configure(4, 2)
        conf.mkspec_add_common_flag('-m64')
    else:
        conf.fatal("This mkspec is not supported on {0}.".format(
            conf.get_mkspec_platform()))
开发者ID:GOPRO1955,项目名称:external-waf-tools,代码行数:10,代码来源:clang_mkspecs.py


示例5: cxx_apple_llvm50_x86

def cxx_apple_llvm50_x86(conf):
    """
    Detect and setup the 32-bit Apple llvm 5.0 compiler (clang 3.3)
    """
    if conf.is_mkspec_platform('mac'):
        conf.mkspec_clang_configure(5, 0)
        conf.mkspec_add_common_flag('-m32')
    else:
        conf.fatal("This mkspec is not supported on {0}.".format(
            conf.get_mkspec_platform()))
开发者ID:GOPRO1955,项目名称:external-waf-tools,代码行数:10,代码来源:clang_mkspecs.py


示例6: cxx_android5_gxx49_x64

def cxx_android5_gxx49_x64(conf):
    """
    Detect and setup the Android 5.0+ g++ 4.9 compiler for x86_64
    """
    # Note: The x86_64 platform was introduced in Android 5 (API Level 21).
    # Therefore the standalone toolchain must be created with the
    # --api=21 option (or above).
    conf.mkspec_gxx_android_configure(4, 9, 'x86_64-linux-android')
    # The PIE binary must be the default in this case
    conf.mkspec_add_common_flag('-fPIE')
    conf.env['LINKFLAGS'] += ['-pie']
开发者ID:steinwurf,项目名称:waf-tools,代码行数:11,代码来源:gxx_mkspecs.py


示例7: cxx_clang34_thread_sanitizer_x64

def cxx_clang34_thread_sanitizer_x64(conf):
    """
    Detect and setup the clang 3.4 compiler for 64 bit and use thread sanitizer
    """
    """
    http://clang.llvm.org/docs/ThreadSanitizer.html
    """
    conf.mkspec_clang_configure(3, 4, force_debug=True)
    conf.mkspec_add_common_flag('-m64')

    conf.mkspec_add_common_flag('-fsanitize=thread')
开发者ID:GOPRO1955,项目名称:external-waf-tools,代码行数:11,代码来源:clang_mkspecs.py


示例8: cxx_android5_gxx49_arm64

def cxx_android5_gxx49_arm64(conf):
    """
    Detects and setup the Android 5.0+ g++ 4.9 compiler for ARM64
    """
    # Note: The arm64 platform was introduced in Android 5 (API Level 21).
    # Therefore the standalone toolchain must be created with the
    # --api=21 option (or above).
    # Only position independent executables (PIE) are supported on Android 5.
    conf.mkspec_gxx_android_configure(4, 9, 'aarch64-linux-android')
    conf.mkspec_add_common_flag('-fPIE')
    conf.env['LINKFLAGS'] += ['-pie']
    # Default "bfd" linker for the arm64 toolchain has an issue with linking
    # shared libraries: https://github.com/android-ndk/ndk/issues/148
    # Force the use of the "gold" linker until it becomes the default
    conf.env['LINKFLAGS'] += ['-fuse-ld=gold']
    conf.env['DEST_CPU'] = 'arm64'
开发者ID:steinwurf,项目名称:waf-tools,代码行数:16,代码来源:gxx_mkspecs.py


示例9: mkspec_setup_gcov

def mkspec_setup_gcov(conf, major, minor, minimum=False):
    """
    Setup g++ for coverage analysis with gcov
    """
    # Don't add any optimization flags (these might lead to incorrect results)
    conf.env['MKSPEC_DISABLE_OPTIMIZATION'] = True

    conf.mkspec_gxx_configure(major, minor, minimum=minimum)

    # Set flag to compile and link code instrumented for coverage analysis
    conf.mkspec_add_common_flag('--coverage')

    # Add flags to disable optimization and all function inlining
    flags = ['-O0', '-fPIC', '-fno-inline', '-fno-inline-small-functions',
             '-fno-default-inline']
    conf.env['CFLAGS'] += flags
    conf.env['CXXFLAGS'] += flags
开发者ID:steinwurf,项目名称:waf-tools,代码行数:17,代码来源:gxx_mkspecs.py


示例10: cxx_clang34_memory_sanitizer_x64

def cxx_clang34_memory_sanitizer_x64(conf):
    """
    Detect and setup the clang 3.4 compiler for 64 bit and use memory sanitizer
    """
    """
    To get a reasonable performance add -O1 or higher. To get
    meaningful stack traces in error messages add
    -fno-omit-frame-pointer. To get perfect stack traces you may need
    to disable inlining (just use -O1) and tail call elimination
    (-fno-optimize-sibling-calls).
    http://clang.llvm.org/docs/MemorySanitizer.html
    """

    conf.mkspec_clang_configure(3, 4, force_debug=True)
    conf.mkspec_add_common_flag('-m64')

    conf.mkspec_add_common_flag('-fsanitize=memory')
    conf.mkspec_add_common_flag('-fsanitize-memory-track-origins')
    conf.mkspec_add_common_flag('-fno-omit-frame-pointer')
    conf.mkspec_add_common_flag('-fno-optimize-sibling-calls')
开发者ID:GOPRO1955,项目名称:external-waf-tools,代码行数:20,代码来源:clang_mkspecs.py


示例11: mkspec_setup_clang_address_sanitizer

def mkspec_setup_clang_address_sanitizer(conf, major, minor, arch,
                                         minimum=False):
    """
    To get a reasonable performance add -O1 or higher. To get nicer
    stack traces in error messages add -fno-omit-frame-pointer. To get
    perfect stack traces you may need to disable inlining (just use
    -O1) and tail call elimination (-fno-optimize-sibling-calls).
    http://clang.llvm.org/docs/AddressSanitizer.html
    """
    conf.mkspec_clang_configure(major, minor, minimum=minimum,
                                force_debug=True)
    conf.mkspec_add_common_flag(arch)

    conf.mkspec_add_common_flag('-fsanitize=address')
    conf.mkspec_add_common_flag('-fno-omit-frame-pointer')
    conf.mkspec_add_common_flag('-fno-optimize-sibling-calls')
开发者ID:steinwurf,项目名称:waf-tools,代码行数:16,代码来源:clang_mkspecs.py


示例12: cxx_clang34_address_sanitizer_x86

def cxx_clang34_address_sanitizer_x86(conf):
    """
    Detect and setup the clang 3.4 compiler for 32 bit and use address
    sanitizer
    """
    """
    To get a reasonable performance add -O1 or higher. To get nicer
    stack traces in error messages add -fno-omit-frame-pointer. To get
    perfect stack traces you may need to disable inlining (just use
    -O1) and tail call elimination (-fno-optimize-sibling-calls).
    http://clang.llvm.org/docs/AddressSanitizer.html
    """

    conf.mkspec_clang_configure(3, 4, force_debug=True)
    conf.mkspec_add_common_flag('-m32')

    conf.mkspec_add_common_flag('-fsanitize=address')
    conf.mkspec_add_common_flag('-fno-omit-frame-pointer')
    conf.mkspec_add_common_flag('-fno-optimize-sibling-calls')
开发者ID:GOPRO1955,项目名称:external-waf-tools,代码行数:19,代码来源:clang_mkspecs.py


示例13: cxx_gxx54_x86

def cxx_gxx54_x86(conf):
    """
    Detect and setup the g++ 5.4 compiler for 32 bit
    """
    conf.mkspec_gxx_configure(5, 4)
    conf.mkspec_add_common_flag('-m32')
开发者ID:steinwurf,项目名称:waf-tools,代码行数:6,代码来源:gxx_mkspecs.py


示例14: cxx_clang70_x86

def cxx_clang70_x86(conf):
    """
    Detect and setup the clang 7.0 compiler for 32 bit
    """
    conf.mkspec_clang_configure(7, 0)
    conf.mkspec_add_common_flag('-m32')
开发者ID:steinwurf,项目名称:waf-tools,代码行数:6,代码来源:clang_mkspecs.py


示例15: cxx_gxx83_x86

def cxx_gxx83_x86(conf):
    """
    Detect and setup the g++ 8.3 compiler for 32 bit
    """
    conf.mkspec_gxx_configure(8, 3)
    conf.mkspec_add_common_flag('-m32')
开发者ID:steinwurf,项目名称:waf-tools,代码行数:6,代码来源:gxx_mkspecs.py


示例16: cxx_gxx82_x64

def cxx_gxx82_x64(conf):
    """
    Detect and setup the g++ 8.2 compiler for 64 bit
    """
    conf.mkspec_gxx_configure(8, 2)
    conf.mkspec_add_common_flag('-m64')
开发者ID:steinwurf,项目名称:waf-tools,代码行数:6,代码来源:gxx_mkspecs.py


示例17: cxx_gxx73_x64

def cxx_gxx73_x64(conf):
    """
    Detect and setup the g++ 7.3 compiler for 64 bit
    """
    conf.mkspec_gxx_configure(7, 3)
    conf.mkspec_add_common_flag('-m64')
开发者ID:steinwurf,项目名称:waf-tools,代码行数:6,代码来源:gxx_mkspecs.py


示例18: cxx_gxx72_x86

def cxx_gxx72_x86(conf):
    """
    Detect and setup the g++ 7.2 compiler for 32 bit
    """
    conf.mkspec_gxx_configure(7, 2)
    conf.mkspec_add_common_flag('-m32')
开发者ID:steinwurf,项目名称:waf-tools,代码行数:6,代码来源:gxx_mkspecs.py


示例19: cxx_gxx49_x86

def cxx_gxx49_x86(conf):
    """
    Detect and setup the g++ 4.9 compiler for 32 bit
    """
    conf.mkspec_gxx_configure(4, 9)
    conf.mkspec_add_common_flag('-m32')
开发者ID:steinwurf,项目名称:waf-tools,代码行数:6,代码来源:gxx_mkspecs.py


示例20: cxx_clang30_x64

def cxx_clang30_x64(conf):
    """
    Detect and setup the clang 3.0 compiler for 64 bit
    """
    conf.mkspec_clang_configure(3, 0)
    conf.mkspec_add_common_flag('-m64')
开发者ID:GOPRO1955,项目名称:external-waf-tools,代码行数:6,代码来源:clang_mkspecs.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python conf.mkspec_gxx_configure函数代码示例发布时间:2022-05-26
下一篇:
Python conf.load函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap