DevHeads.net

com web/rmtools: Add dependencies dirs to the for the PGO runs: include/BuildVC.php

Link: <a href="http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=c0a4bdcbdae1c1c39f636ac8006359cdbbf49f0d" title="http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=c0a4bdcbdae1c1c39f636ac8006359cdbbf49f0d">http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=c0a4bdcbdae1c1c39f6...</a>

Log:
Add dependencies dirs to the for the PGO runs

Changed paths:
M include/BuildVC.php

Diff:
diff --git a/include/BuildVC.php b/include/BuildVC.php
index c32de9c..22ff570 100644
--- a/include/BuildVC.php
+++ b/include/BuildVC.php
@@ -122,8 +122,11 @@ class BuildVC {

function isPgoSetup()
{
+ $env = $this->env;
+ $env["PATH"] = dirname($this->build_dir) . DIRECTORY_SEPARATOR . "deps;" . $env["PATH"];
+
$cmd = 'phpsdk_pgo --ready';
- $ret = exec_single_log($cmd, $this->build_dir, $this->env);
+ $ret = exec_single_log($cmd, $this->build_dir, $env);
if (!$ret) {
throw new \Exception('phpsdk_pgo --ready failed');
}
@@ -134,9 +137,11 @@ class BuildVC {
function pgoInit()
{
$this->log_pgo = isset($this->log_pgo) ? $this->log_pgo . "\n" : "";
+ $env = $this->env;
+ $env["PATH"] = dirname($this->build_dir) . DIRECTORY_SEPARATOR . "deps;" . $env["PATH"];

$cmd = 'phpsdk_pgo --init';
- $ret = exec_single_log($cmd, $this->build_dir, $this->env);
+ $ret = exec_single_log($cmd, $this->build_dir, $env);
if (!$ret || 0 != $ret["return_value"]) {
throw new \Exception('phpsdk_pgo --init failed');
}
@@ -146,9 +151,11 @@ class BuildVC {
function pgoTrain()
{
$this->log_pgo = isset($this->log_pgo) ? $this->log_pgo . "\n" : "";
+ $env = $this->env;
+ $env["PATH"] = dirname($this->build_dir) . DIRECTORY_SEPARATOR . "deps;" . $env["PATH"];

$cmd = 'phpsdk_pgo --train';
- $ret = exec_single_log($cmd, $this->build_dir, $this->env);
+ $ret = exec_single_log($cmd, $this->build_dir, $env);
if (!$ret || 0 != $ret["return_value"]) {
throw new \Exception('phpsdk_pgo --train failed');
}