chromium 源码学习笔记

1、NDEBUG 宏
位置:src/build/config/BUILD.gn,定义在 “release” 的 config 配置块中。
什么时候该配置块生效,查找代码发现 src/build/config/BUILDCONFIG.gn 中通过 //build/config:release 引用了该配置块,使得它生效,而生效前提是 is_debug 为 false。is_debug 也在 BUILDCONFIG.gn 中定义:

 is_debug = !is_official_build

is_official_build 也定义在 BUILDCONFIG.gn 中,默认值为 false

以上是默认情况,在使用脚本编译时,可以通过 GN_DEFINES 来自定义 is_debug 的值:

// python 脚本
    global BUILD_DEBUG
    if BUILD_DEBUG and build_type == 'debug':
        is_debug = 'true'
    else:
        is_debug = 'false'
    GN_DEFINES += ' clang_use_chrome_plugins = false is_debug = %s symbol_level = %r' % (is_debug, SYMBOL_LEVEL)

相关推荐

  1. chromium 学习笔记

    2024-03-29 11:16:03       42 阅读
  2. ArrayList学习笔记(3)

    2024-03-29 11:16:03       64 阅读
  3. rnn 和lstm学习笔记

    2024-03-29 11:16:03       31 阅读
  4. JUC并发编程与分析学习笔记(二)

    2024-03-29 11:16:03       56 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-03-29 11:16:03       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-03-29 11:16:03       100 阅读
  3. 在Django里面运行非项目文件

    2024-03-29 11:16:03       82 阅读
  4. Python语言-面向对象

    2024-03-29 11:16:03       91 阅读

热门阅读

  1. 自动化组高度件切割计算

    2024-03-29 11:16:03       42 阅读
  2. Docker学习指南

    2024-03-29 11:16:03       35 阅读
  3. 简述机器视觉技术在自动化行业中的典型应用

    2024-03-29 11:16:03       42 阅读
  4. 自动化更新包文件--shell脚本

    2024-03-29 11:16:03       41 阅读
  5. Go打造REST Server【四】:Graphql进阶

    2024-03-29 11:16:03       40 阅读