Changeset 181092 in webkit


Ignore:
Timestamp:
Mar 5, 2015 12:05:20 PM (9 years ago)
Author:
Brent Fulgham
Message:

[Win] Switch to MSBuild so we get more useful stdout logging in buildbot
https://bugs.webkit.org/show_bug.cgi?id=140845

Reviewed by David Kilzer.

Update 'webkitdirs.pm' to locate the MSBuild used with Visual Studio 2013
and generate suitable build commands to drive a full build from our
existing solution files.

  • Scripts/webkitdirs.pm:

(msBuildInstallDir): Added.
(determineConfigurationForVisualStudio): Revise to use MSBuild command
line arguments to drive the build.
(setupCygwinEnv): Warn user if MSBuild cannot be located.
(buildVisualStudioProject): Revise to use MSBuild command line arguments
to specify build architecture.

  • win/AssembleBuildLogs/AssembleLogs.cmd: MSBuild doesn't produce individual

output logs, so don't attempt to consolidate them. Also: Drive-by fix: Don't
bother looking for CoreUI or SafariTheme build logs.

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r181088 r181092  
     12015-03-05  Brent Fulgham  <bfulgham@apple.com>
     2
     3        [Win] Switch to MSBuild so we get more useful stdout logging in buildbot
     4        https://bugs.webkit.org/show_bug.cgi?id=140845
     5
     6        Reviewed by David Kilzer.
     7
     8        Update 'webkitdirs.pm' to locate the MSBuild used with Visual Studio 2013
     9        and generate suitable build commands to drive a full build from our
     10        existing solution files.
     11
     12        * Scripts/webkitdirs.pm:
     13        (msBuildInstallDir): Added.
     14        (determineConfigurationForVisualStudio): Revise to use MSBuild command
     15        line arguments to drive the build.
     16        (setupCygwinEnv): Warn user if MSBuild cannot be located.
     17        (buildVisualStudioProject): Revise to use MSBuild command line arguments
     18        to specify build architecture.
     19        * win/AssembleBuildLogs/AssembleLogs.cmd: MSBuild doesn't produce individual
     20        output logs, so don't attempt to consolidate them. Also: Drive-by fix: Don't
     21        bother looking for CoreUI or SafariTheme build logs.
     22
    1232015-03-05  Csaba Osztrogonác  <ossy@webkit.org>
    224
  • trunk/Tools/Scripts/webkitdirs.pm

    r179694 r181092  
    126126my $vcBuildPath;
    127127my $vsInstallDir;
     128my $msBuildInstallDir;
    128129my $vsVersion;
    129130my $windowsSourceDir;
     
    516517}
    517518
     519sub msBuildInstallDir
     520{
     521    return $msBuildInstallDir if defined $msBuildInstallDir;
     522
     523    $msBuildInstallDir = File::Spec->catdir(programFilesPath(), "MSBuild", "12.0", "Bin");
     524    chomp($msBuildInstallDir = `cygpath "$msBuildInstallDir"`) if isCygwin();
     525
     526    return $msBuildInstallDir;
     527}
     528
    518529sub visualStudioVersion
    519530{
     
    532543    determineConfiguration();
    533544    # FIXME: We should detect when Debug_All or Production has been chosen.
    534     $configurationForVisualStudio = $configuration . (isWin64() ? "|x64" : "|Win32");
     545    $configurationForVisualStudio = "/p:Configuration=" . $configuration;
    535546}
    536547
     
    15651576
    15661577    my $programFilesPath = programFilesPath();
    1567     $vcBuildPath = File::Spec->catfile(visualStudioInstallDir(), qw(Common7 IDE devenv.com));
    1568     if (-e $vcBuildPath) {
     1578    my $visualStudioPath = File::Spec->catfile(visualStudioInstallDir(), qw(Common7 IDE devenv.com));
     1579    if (-e $visualStudioPath) {
    15691580        # Visual Studio is installed;
    15701581        if (visualStudioVersion() eq "12") {
    1571             $vcBuildPath = File::Spec->catfile(visualStudioInstallDir(), qw(Common7 IDE devenv.exe));
     1582            $visualStudioPath = File::Spec->catfile(visualStudioInstallDir(), qw(Common7 IDE devenv.exe));
    15721583        }
    15731584    } else {
    15741585        # Visual Studio not found, try VC++ Express
    1575         $vcBuildPath = File::Spec->catfile(visualStudioInstallDir(), qw(Common7 IDE WDExpress.exe));
    1576         if (! -e $vcBuildPath) {
     1586        $visualStudioPath = File::Spec->catfile(visualStudioInstallDir(), qw(Common7 IDE WDExpress.exe));
     1587        if (! -e $visualStudioPath) {
    15771588            print "*************************************************************\n";
    1578             print "Cannot find '$vcBuildPath'\n";
     1589            print "Cannot find '$visualStudioPath'\n";
    15791590            print "Please execute the file 'vcvars32.bat' from\n";
    15801591            print "'$programFilesPath\\Microsoft Visual Studio 12.0\\VC\\bin\\'\n";
     
    15911602    # FIXME (125180): Remove the following temporary 64-bit support once official support is available.
    15921603    print "WEBKIT_64_SUPPORT is set to: ", $ENV{"WEBKIT_64_SUPPORT"}, "\n" if isWin64();
     1604
     1605    # We will actually use MSBuild to build WebKit, but we need to find the Visual Studio install (above) to make
     1606    # sure we use the right options.
     1607    $vcBuildPath = File::Spec->catfile(msBuildInstallDir(), qw(MSBuild.exe));
     1608    if (! -e $vcBuildPath) {
     1609        print "*************************************************************\n";
     1610        print "Cannot find '$vcBuildPath'\n";
     1611        print "Please make sure execute that the Microsoft .NET Framework SDK\n";
     1612        print "is installed on this machine.\n";
     1613        print "*************************************************************\n";
     1614        die;
     1615    }
    15931616}
    15941617
     
    16561679    chomp($project = `cygpath -w "$project"`) if isCygwin();
    16571680
    1658     my $action = "/build";
     1681    my $action = "/t:build";
    16591682    if ($clean) {
    1660         $action = "/clean";
    1661     }
    1662 
    1663     my @command = ($vcBuildPath, $project, $action, $config);
     1683        $action = "/t:clean";
     1684    }
     1685
     1686    my $platform = "/p:Platform=" . (isWin64() ? "x64" : "Win32");
     1687    my $logFile = File::Spec->catdir($baseProductDir, $configuration, "BuildOutput.htm");
     1688    chomp($logFile = `cygpath -w "$logFile"`) if isCygwin();
     1689    my $logging = "/flp:LogFile=" . $logFile . ";Verbosity=minimal";
     1690   
     1691    my @command = ($vcBuildPath, "/verbosity:minimal", $project, $action, $config, $platform, "/fl", $logging);
    16641692
    16651693    print join(" ", @command), "\n";
  • trunk/Tools/win/AssembleBuildLogs/AssembleLogs.cmd

    r180705 r181092  
    3535:SkipANGLEProjects
    3636
     37if not exist "%CONFIGURATIONBUILDDIR%\obj%PlatformArchitecture%\WTF\BuildLog.htm" GOTO SkipIndividualBuilds
     38
    3739echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
    3840echo COMPILING WTF...                                          >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
     
    117119type "%CONFIGURATIONBUILDDIR%\obj%PlatformArchitecture%\WebKitQuartzCoreAdditions\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
    118120
    119 echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
    120 echo COMPILING CoreUI...                                       >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
    121 echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
    122 type "%CONFIGURATIONBUILDDIR%\obj%PlatformArchitecture%\CoreUI\BuildLog.htm"       >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
    123 
    124 echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
    125 echo COMPILING SafariTheme...                                  >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
    126 echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
    127 type "%CONFIGURATIONBUILDDIR%\obj%PlatformArchitecture%\SafariTheme\BuildLog.htm"  >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
    128 
    129121:SkipInternalProjects
    130122
     
    213205echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
    214206type "%CONFIGURATIONBUILDDIR%\obj%PlatformArchitecture%\TestWebKitAPI\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
     207
     208:SkipIndividualBuilds
     209echo "No individual build logs to address"
Note: See TracChangeset for help on using the changeset viewer.