6

I am new to chromium source code. I have few doubt regarding chromium source code make files(gyp, gypi).

1) what is the difference between .gyp and .gypi files?

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

2) How can i check which file is compiling for linux/mac/windows chromium code. Because when i check the file in .gyp file i show that it list almost all the files of webcore for mac/linux/android/ etc.

above doubt is killing me:(

4

1 回答 1

4

按照惯例,包含的文件具有后缀 .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',
    ],
于 2014-02-18T04:31:35.920 回答