예제 #1
0
def EntryPoint(registry, out_dir, config, platform):
    if not os.path.exists(out_dir):
        os.makedirs(out_dir)

    if platform == 'host':
        platform = sys.platform

    host_toolchain = cc_discovery.DiscoverHostToolchain()

    if platform == 'raspi':
        toolchain = raspi.RaspberryPiToolchain()
    else:
        toolchain = host_toolchain

    if config == 'debug':
        out_dir = os.path.join(out_dir, 'debug')
        configuration = cc.Configuration(optimize='None', include_symbols=True)
    elif config == 'release':
        out_dir = os.path.join(out_dir, 'release')
        configuration = cc.Configuration(optimize='Maximum',
                                         include_symbols=False)

    configured_toolchain = cc.ToolchainWithConfiguration(
        toolchain, configuration)

    host_configuration = cc.Configuration(optimize='Maximum',
                                          include_symbols=False)
    host_configured_toolchain = cc.ToolchainWithConfiguration(
        host_toolchain, host_configuration)

    stdext_modules = registry.SubRespireExternal(
        'stdext/src/build.respire.py',
        'Build',
        out_dir=os.path.join(out_dir, 'stdext'),
        configured_toolchain=configured_toolchain,
        platform=platform)

    entify_modules = registry.SubRespire(
        Build,
        out_dir=os.path.join(out_dir, 'entify'),
        platform=platform,
        configured_toolchain=configured_toolchain,
        host_configured_toolchain=host_configured_toolchain,
        stdext_modules=stdext_modules)

    registry.SubRespire(StartBuilds, build_modules=entify_modules)
    registry.SubRespire(StartPackageBuild,
                        out_dir=os.path.join(out_dir, 'package'),
                        build_modules=entify_modules)
예제 #2
0
def EntryPoint(registry, out_dir):
    toolchain = cc_discovery.DiscoverHostToolchain()
    configuration = cc.Configuration(optimize='Maximum')

    configured_toolchain = cc.ToolchainWithConfiguration(
        toolchain, configuration)

    googletest_modules = registry.SubRespireExternal(
        'stdext/src/third_party/googletest/build.respire.py',
        'Build',
        out_dir=os.path.join(out_dir, 'googletest'),
        configured_toolchain=configured_toolchain)

    stdext_modules = registry.SubRespireExternal(
        'stdext/src/build.respire.py',
        'Build',
        out_dir=os.path.join(out_dir, 'stdext'),
        configured_toolchain=configured_toolchain,
        googletest_modules=googletest_modules)

    build_outputs = registry.SubRespire(
        Build,
        out_dir=out_dir,
        configured_toolchain=configured_toolchain,
        stdext_modules=stdext_modules,
        googletest_modules=googletest_modules)

    registry.SubRespire(StartBuilds,
                        build_targets=build_outputs,
                        stdext_modules=stdext_modules)
예제 #3
0
def EntryPoint(registry, out_dir):
  toolchain = cc_discovery.DiscoverHostToolchain()
  configured_toolchain = cc.ToolchainWithConfiguration(
      toolchain, cc.Configuration())

  main_module = modules.ExecutableModule(
      'simple_multi_source_cpp', registry, out_dir, configured_toolchain,
      sources=[
        'main.cc',
        'database.cc',
        'database.h',
      ])

  for output in main_module.GetOutputFiles():
    registry.Build(output)
예제 #4
0
def EntryPoint(registry, out_dir, target, config, platform):
  if platform == 'raspi':
    if 'RASPI_TOOLS' not in os.environ:
      print('Set the RASPI_TOOLS environment variable to the location that ' +
            'you cloned https://github.com/raspberrypi/tools in to.')
      assert False
    toolchain = raspi.RaspberryPiToolchain(os.environ['RASPI_TOOLS'])
  else:
    assert platform == 'host'
    toolchain = cc_discovery.DiscoverHostToolchain()

  if config == 'debug':
    out_dir = os.path.join(out_dir, 'debug')
    configuration = cc.Configuration(optimize='None', include_symbols=True)
  elif config == 'release':
    out_dir = os.path.join(out_dir, 'release')
    configuration = cc.Configuration(optimize='Maximum', include_symbols=False)

  configured_toolchain = cc.ToolchainWithConfiguration(toolchain, configuration)

  googletest_modules = registry.SubRespireExternal(
      'ebb/src/stdext/src/third_party/googletest/build.respire.py', 'Build',
      out_dir=os.path.join(out_dir, 'googletest'),
      configured_toolchain=configured_toolchain)

  stdext_modules = registry.SubRespireExternal(
      'ebb/src/stdext/src/build.respire.py', 'Build',
      out_dir=os.path.join(out_dir, 'stdext'),
      configured_toolchain=configured_toolchain,
      googletest_modules=googletest_modules)

  ebb_outputs = registry.SubRespireExternal(
      'ebb/src/build.respire.py', 'Build', out_dir=os.path.join(out_dir, 'ebb'),
      configured_toolchain=configured_toolchain,
      stdext_modules=stdext_modules,
      googletest_modules=googletest_modules)

  build_outputs = registry.SubRespire(
      Build, out_dir=out_dir, configured_toolchain=configured_toolchain,
      googletest_modules=googletest_modules,
      ebb_outputs=ebb_outputs,
      stdext_modules=stdext_modules)

  registry.SubRespire(StartBuilds, respire_build_targets=build_outputs,
                      ebb_build_targets=ebb_outputs,
                      stdext_build_targets=stdext_modules, target=target)