Ejemplo n.º 1
0
int main()
{
    //Timer t;
    Environment env( GetEnvironmentStringsA(), false );

    std::string compilerExecutable;
    PathList pathList;
    getPath( env, pathList );
    if ( !findOnPath( pathList, "cl.exe", compilerExecutable ) )
    {
        std::cerr << "Failed to locate executable 'cl.exe' on PATH.\n";
        return -1;
    }

    bool const disableFallback = !!env.get( "BP_DISABLE_FALLBACK" );
    llvm::Optional<std::string> const portNameVar( env.get( "BP_MANAGER_PORT" ) );

    return distributedCompile(
        "msvc",
        compilerExecutable.c_str(),
        env,
        GetCommandLineA(),
        NULL,
        portNameVar ? portNameVar->data() : "default",
        disableFallback ? NULL : runLocallyFallback,
        const_cast<char *>( compilerExecutable.c_str() )
    );
}
Ejemplo n.º 2
0
BOOL
TSHPath::FindOnPath(LPTSTR pszPath, LPCTSTR * ppszOtherDirs)
{
  static TModuleProc2<BOOL,LPTSTR,LPCTSTR*>
         findOnPath(GetModule(), FindOnPathStr);
  return findOnPath(pszPath, ppszOtherDirs);
}
Ejemplo n.º 3
0
void ChildProcess::init(const std::string& command,
                        const ProcessOptions& options)
{
   exe_ = findOnPath("cmd.exe");
   args_.push_back("/S");
   args_.push_back("/C");
   args_.push_back("\"" + command + "\"");
   options_ = options;
}