tb01070 / gyp

Automatically exported from code.google.com/p/gyp
0 stars 0 forks source link

make_global_settings is not fully supported in Ninja generator #434

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Probably this is a remaining task of Issue 172 and Issue 213.

'make_global_settings' is really helpful if we have to cross-compile a product. 
NaCl, Android NDK, and Emscripten are good examples.

'make_global_settings' works perfectly with Make generator. However, Ninja 
generator hasn't yet support all the tools that are supported in Make 
generator.  Actually only 'CC'/'CC.host' and 'CXX'/'CXX.host' pairs are 
supported in Ninja generator as of gyp r1930.  It would be really great if 
Ninja generator can support these missing items.

{
  'make_global_settings': [
    ['AR', 'my_custom_ar_target'],       # not supported in Ninja as of gyp r1930
    ['CC', 'my_custom_cc_target'],
    ['CXX', 'my_custom_cxx_target'],
    ['LD', 'my_custom_ld_target'],       # not supported in Ninja as of gyp r1930
    ['NM', 'my_custom_nm_target'],       # not supported in Ninja as of gyp r1930
    ['AR.host', 'my_custom_ar_host'],    # not supported in Ninja as of gyp r1930
    ['CC.host', 'my_custom_cc_host'],
    ['CXX.host', 'my_custom_cxx_host],
    ['LD.host', 'my_custom_ld_host'],    # not supported in Ninja as of gyp r1930
    ['NM.host', 'my_custom_nm_host'],    # not supported in Ninja as of gyp r1930
  ],
  'targets': [
    {
      'target_name': 'make_global_settings_test',
      'type': 'static_library',
      'sources': [ 'foo.c' ],
    },
  ],
}

Original issue reported on code.google.com by yukawa@chromium.org on 8 Jun 2014 at 4:47

GoogleCodeExporter commented 9 years ago
Let me update the progress on this effort as of r1967. Now 'AR'/'AR.host' and 
'LD'/'LD.host' are functional.

{
  'make_global_settings': [
    ['AR', 'my_custom_ar_target'],       # supported in gyp r1942 and later
    ['CC', 'my_custom_cc_target'],
    ['CXX', 'my_custom_cxx_target'],
    ['LD', 'my_custom_ld_target'],       # supported in gyp r1942
    ['NM', 'my_custom_nm_target'],       # not supported as of gyp r1967
    ['AR.host', 'my_custom_ar_host'],    # supported in gyp r1942 and later
    ['CC.host', 'my_custom_cc_host'],
    ['CXX.host', 'my_custom_cxx_host],
    ['LD.host', 'my_custom_ld_host'],    # supported since gyp r1941
    ['NM.host', 'my_custom_nm_host'],    # not supported as of gyp r1967
  ],
  'targets': [
    {
      'target_name': 'make_global_settings_test',
      'type': 'static_library',
      'sources': [ 'foo.c' ],
    },
  ],
}

Original comment by yukawa@chromium.org on 20 Aug 2014 at 8:08