【问题标题】:customizing gyp and gypi files of chromium source code to add a new file自定义 chromium 源代码的 gyp 和 gypi 文件以添加新文件
【发布时间】:2013-03-08 04:15:14
【问题描述】:

我是铬源代码的新手。我对铬源代码制作文件(gyp,gypi)毫无疑问。

1) .gyp.gypi 文件有什么区别?

./Source/WebCore/WebCore.gyp/WebCore.gyp
./Source/WebCore/WebCore.gyp/gyp/WebCore.gypi

2) 我如何检查哪个文件正在为 linux/mac/windows chromium 代码编译。 因为当我检查.gyp 文件中的文件时,我显示它列出了几乎所有用于 mac/linux/android/ 等的 webcore 文件。

毫无疑问是要了我的命:(

【问题讨论】:

  • 另见GYP documentation。很难找到……Google 搜索第 2 页上的 Google 构建工具?! :)

标签: google-chrome chromium


【解决方案1】:

按照惯例,包含的文件具有后缀 .gypi(gyp 包含)。 一个 .gyp 文件可能在其包含字段中包含多个 .gypi 文件。 喜欢这里:

  'includes': [
    '../build/win/precompile.gypi',
    '../build/features.gypi',
    '../build/scripts/scripts.gypi',
    '../modules/modules.gypi',
    '../bindings/bindings.gypi',
    'core.gypi',
  ],

要了解哪些代码正在为您的平台编译,您可以检查您的代码中是否存在以下条件:

    ['OS=="win"', {
      # In generated bindings code: 'switch contains default but no case'.
      # Disable c4267 warnings until we fix size_t to int truncations.
      'msvs_disabled_warnings': [ 4065, 4267 ],

    'include_dirs': [
      '<@(webcore_include_dirs)',
      '<(DEPTH)/gpu',
      '<(angle_path)/include',
    ],

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-04-30
    • 2012-01-12
    相关资源
    最近更新 更多