Changeset 225563 in webkit


Ignore:
Timestamp:
Dec 5, 2017 6:18:57 PM (6 years ago)
Author:
commit-queue@webkit.org
Message:

Switch windows build to Visual Studio 2017
https://bugs.webkit.org/show_bug.cgi?id=172412

Patch by Stephan Szabo <stephan.szabo@sony.com> on 2017-12-05
Reviewed by Per Arne Vollan.

.:

  • Source/cmake/OptionsMSVC.cmake:

Source/JavaScriptCore:

Source/WebCore:

Only changes proj file to update generator

  • WebCore.vcxproj/WebCore.proj:

Source/WebKitLegacy:

  • WebKitLegacy.vcxproj/WebKitLegacy.proj:

Source/WTF:

  • WTF.vcxproj/WTF.proj:
  • wtf/Compiler.h:

Tools:

  • Scripts/build-webkit:
  • Scripts/webkitdirs.pm:

(visualStudioInstallDir):
(visualStudioInstallDirFallback):
(msBuildInstallDir):
(setupAppleWinEnv):
(setupCygwinEnv):
(generateBuildSystemFromCMakeProject):
(pickLegacyVisualStudioInstallation): Deleted.
(visualStudioInstallDirLegacy): Deleted.
(visualStudioVersion): Deleted.
(visualStudioVersionFromInstallDir): Deleted.

Location:
trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r225421 r225563  
     12017-12-05  Stephan Szabo  <stephan.szabo@sony.com>
     2
     3        Switch windows build to Visual Studio 2017
     4        https://bugs.webkit.org/show_bug.cgi?id=172412
     5
     6        Reviewed by Per Arne Vollan.
     7
     8        * Source/cmake/OptionsMSVC.cmake:
     9
    1102017-12-01  Konstantin Tokarev  <annulen@yandex.ru>
    211
  • trunk/Source/JavaScriptCore/ChangeLog

    r225550 r225563  
     12017-12-05  Stephan Szabo  <stephan.szabo@sony.com>
     2
     3        Switch windows build to Visual Studio 2017
     4        https://bugs.webkit.org/show_bug.cgi?id=172412
     5
     6        Reviewed by Per Arne Vollan.
     7
     8        * JavaScriptCore.vcxproj/JavaScriptCore.proj:
     9
    1102017-12-05  JF Bastien  <jfbastien@apple.com>
    211
  • trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.proj

    r222287 r225563  
    5555    <Message Text="Building $(CONFIGURATION) Solution" />
    5656    <Error Text="DSTROOT property or environment variable must be defined." Condition="'$(DSTROOT)' == ''" />
    57         <Exec Command="$(CMakeCommandCommon) -DWTF_CPU_X86=1 -G &quot;Visual Studio 14 2015&quot;" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build32"/>
     57        <Exec Command="$(CMakeCommandCommon) -DWTF_CPU_X86=1 -G &quot;Visual Studio 15 2017&quot;" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build32"/>
    5858        <Exec Command="msbuild Project.sln /p:Configuration=$(CONFIG)" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build32"/>
    59         <Exec Command="$(CMakeCommandCommon) -DWTF_CPU_X86_64=1 -G &quot;Visual Studio 14 2015 Win64&quot;" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build64"/>
     59        <Exec Command="$(CMakeCommandCommon) -DWTF_CPU_X86_64=1 -G &quot;Visual Studio 15 2017 Win64&quot;" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build64"/>
    6060        <Exec Command="msbuild Project.sln /p:Configuration=$(CONFIG)" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build64"/>
    6161  </Target>
  • trunk/Source/WTF/ChangeLog

    r225558 r225563  
     12017-12-05  Stephan Szabo  <stephan.szabo@sony.com>
     2
     3        Switch windows build to Visual Studio 2017
     4        https://bugs.webkit.org/show_bug.cgi?id=172412
     5
     6        Reviewed by Per Arne Vollan.
     7
     8        * WTF.vcxproj/WTF.proj:
     9        * wtf/Compiler.h:
     10
    1112017-12-05  Andy Estes  <aestes@apple.com>
    212
  • trunk/Source/WTF/WTF.vcxproj/WTF.proj

    r221076 r225563  
    4747    <Message Text="Building $(CONFIGURATION) Solution" />
    4848    <Error Text="DSTROOT property or environment variable must be defined." Condition="'$(DSTROOT)' == ''" />
    49         <Exec Command="$(CMakeCommandCommon) -DWTF_CPU_X86=1 -G &quot;Visual Studio 14 2015&quot;" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build32"/>
     49        <Exec Command="$(CMakeCommandCommon) -DWTF_CPU_X86=1 -G &quot;Visual Studio 15 2017&quot;" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build32"/>
    5050        <Exec Command="msbuild Project.sln /p:Configuration=$(CONFIG)" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build32"/>
    51         <Exec Command="$(CMakeCommandCommon) -DWTF_CPU_X86_64=1 -G &quot;Visual Studio 14 2015 Win64&quot;" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build64"/>
     51        <Exec Command="$(CMakeCommandCommon) -DWTF_CPU_X86_64=1 -G &quot;Visual Studio 15 2017 Win64&quot;" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build64"/>
    5252        <Exec Command="msbuild Project.sln /p:Configuration=$(CONFIG)" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build64"/>
    5353  </Target>
  • trunk/Source/WTF/wtf/Compiler.h

    r222930 r225563  
    131131#define WTF_COMPILER_SUPPORTS_CXX_REFERENCE_QUALIFIED_FUNCTIONS 1
    132132
    133 #if _MSC_VER < 1900
    134 #error "Please use a newer version of Visual Studio. WebKit requires VS2015 or newer to compile."
     133#if _MSC_VER < 1910
     134#error "Please use a newer version of Visual Studio. WebKit requires VS2017 or newer to compile."
    135135#endif
    136136
  • trunk/Source/WebCore/ChangeLog

    r225562 r225563  
     12017-12-05  Stephan Szabo  <stephan.szabo@sony.com>
     2
     3        Switch windows build to Visual Studio 2017
     4        https://bugs.webkit.org/show_bug.cgi?id=172412
     5
     6        Reviewed by Per Arne Vollan.
     7
     8        Only changes proj file to update generator
     9
     10        * WebCore.vcxproj/WebCore.proj:
     11
    1122017-12-05  Brent Fulgham  <bfulgham@apple.com>
    213
  • trunk/Source/WebCore/WebCore.vcxproj/WebCore.proj

    r219335 r225563  
    5555    <Message Text="Building $(CONFIGURATION) Solution" />
    5656    <Error Text="DSTROOT property or environment variable must be defined." Condition="'$(DSTROOT)' == ''" />
    57         <Exec Command="$(CMakeCommandCommon) -DWTF_CPU_X86=1 -G &quot;Visual Studio 14 2015&quot;" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build32"/>
     57        <Exec Command="$(CMakeCommandCommon) -DWTF_CPU_X86=1 -G &quot;Visual Studio 15 2017&quot;" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build32"/>
    5858        <Exec Command="msbuild Project.sln /p:Configuration=$(CONFIG)" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build32"/>
    59         <Exec Command="$(CMakeCommandCommon) -DWTF_CPU_X86_64=1 -G &quot;Visual Studio 14 2015 Win64&quot;" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build64"/>
     59        <Exec Command="$(CMakeCommandCommon) -DWTF_CPU_X86_64=1 -G &quot;Visual Studio 15 2017 Win64&quot;" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build64"/>
    6060        <Exec Command="msbuild Project.sln /p:Configuration=$(CONFIG)" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build64"/>
    6161  </Target>
  • trunk/Source/WebKitLegacy/ChangeLog

    r225191 r225563  
     12017-12-05  Stephan Szabo  <stephan.szabo@sony.com>
     2
     3        Switch windows build to Visual Studio 2017
     4        https://bugs.webkit.org/show_bug.cgi?id=172412
     5
     6        Reviewed by Per Arne Vollan.
     7
     8        * WebKitLegacy.vcxproj/WebKitLegacy.proj:
     9
    1102017-11-27  Don Olmstead  <don.olmstead@sony.com>
    211
  • trunk/Source/WebKitLegacy/WebKitLegacy.vcxproj/WebKitLegacy.proj

    r222526 r225563  
    5555    <Message Text="Building $(CONFIGURATION) Solution" />
    5656    <Error Text="DSTROOT property or environment variable must be defined." Condition="'$(DSTROOT)' == ''" />
    57         <Exec Command="$(CMakeCommandCommon) -DWTF_CPU_X86=1 -G &quot;Visual Studio 14 2015&quot;" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build32"/>
     57        <Exec Command="$(CMakeCommandCommon) -DWTF_CPU_X86=1 -G &quot;Visual Studio 15 2017&quot;" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build32"/>
    5858        <Exec Command="msbuild Project.sln /p:Configuration=$(CONFIG)" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build32"/>
    59         <Exec Command="$(CMakeCommandCommon) -DWTF_CPU_X86_64=1 -G &quot;Visual Studio 14 2015 Win64&quot;" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build64"/>
     59        <Exec Command="$(CMakeCommandCommon) -DWTF_CPU_X86_64=1 -G &quot;Visual Studio 15 2017 Win64&quot;" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build64"/>
    6060        <Exec Command="msbuild Project.sln /p:Configuration=$(CONFIG)" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build64"/>
    6161  </Target>
  • trunk/Source/cmake/OptionsMSVC.cmake

    r225191 r225563  
    9898
    9999if (COMPILER_IS_CLANG_CL)
    100     # FIXME: We need to set the msc-version above the one it defaults to
    101     # when using clang-cl with VS2015. This might be unnecessary when moving to
    102     # VS2017 as part of https://bugs.webkit.org/show_bug.cgi?id=172412
    103     add_compile_options(-fmsc-version=190023918)
     100    # FIXME: The clang-cl visual studio integration seemed to set
     101    # this to 1900 explicitly even when building in VS2017 with the
     102    # newest toolset option, but we want to be versioned to match
     103    # VS2017.
     104    add_compile_options(-fmsc-version=1911)
    104105
    105106    # FIXME: Building with clang-cl seemed to fail with 128 bit int support
  • trunk/Tools/ChangeLog

    r225553 r225563  
     12017-12-05  Stephan Szabo  <stephan.szabo@sony.com>
     2
     3        Switch windows build to Visual Studio 2017
     4        https://bugs.webkit.org/show_bug.cgi?id=172412
     5
     6        Reviewed by Per Arne Vollan.
     7
     8        * Scripts/build-webkit:
     9        * Scripts/webkitdirs.pm:
     10        (visualStudioInstallDir):
     11        (visualStudioInstallDirFallback):
     12        (msBuildInstallDir):
     13        (setupAppleWinEnv):
     14        (setupCygwinEnv):
     15        (generateBuildSystemFromCMakeProject):
     16        (pickLegacyVisualStudioInstallation): Deleted.
     17        (visualStudioInstallDirLegacy): Deleted.
     18        (visualStudioVersion): Deleted.
     19        (visualStudioVersionFromInstallDir): Deleted.
     20
    1212017-12-05  Alex Christensen  <achristensen@webkit.org>
    222
  • trunk/Tools/Scripts/build-webkit

    r225098 r225563  
    289289    chdirWebKit();
    290290    if (exitStatus(generateBuildSystemFromCMakeProject($prefixPath, @cmakeArgs))) {
    291         die "Run \"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/vcvarsall.bat\" before build-webkit when using ninja";
     291        die "Run Visual Studio 2017 installation vcvars.bat before build-webkit when using ninja";
    292292    }
    293293
  • trunk/Tools/Scripts/webkitdirs.pm

    r225098 r225563  
    162162my $willUseVCExpressWhenBuilding = 0;
    163163my $vsWhereFoundInstallation;
    164 my $vsWhereLegacyInstallation;
    165164
    166165# Defined in VCSUtils.
     
    635634}
    636635
    637 sub pickLegacyVisualStudioInstallation
    638 {
    639     return $vsWhereLegacyInstallation if defined $vsWhereLegacyInstallation;
    640 
    641     requireModulesForVSWhere();
    642     determineSourceDir();
    643 
    644     my $vsWhereOut = `$sourceDir/WebKitLibraries/win/tools/vswhere -nologo -legacy -format json`;
    645     my $installations_all = [];
    646     eval {
    647         $installations_all = JSON::PP::decode_json(Encode::encode('UTF-8' => Encode::decode(console_in => $vsWhereOut)));
    648     };
    649     print "Error getting Visual Studio Legacy Location: $@\n" if $@;
    650     undef $@;
    651 
    652     # It's possible that a non-legacy installation without msbuild
    653     # would not be found by the latest, but would be found by this
    654     # vswhere call, and we want to skip those, so check for versions
    655     # with an installation version before 15.0.
    656     my @installations = grep { $_->{installationVersion} < 15 } @$installations_all;
    657 
    658     # We don't get much information that would let us choose between
    659     # legacy installations, so we'll take the first.
    660     if (scalar @installations) {
    661         my $installation = $installations[0];
    662         $vsWhereLegacyInstallation = $installation;
    663         return $installation;
    664     }
    665     return undef;
    666 }
    667 
    668636sub visualStudioInstallDir
    669637{
     
    676644        $vsInstallDir = visualStudioInstallDirVSWhere();
    677645        if (not -e $vsInstallDir) {
    678             $vsInstallDir = visualStudioInstallDirLegacy();
    679         }
    680         if (not -e $vsInstallDir) {
    681646            $vsInstallDir = visualStudioInstallDirFallback();
    682             print "Fallback $vsInstallDir\n";
    683647        }
    684648    }
     
    694658    if (defined($vsWhereFoundInstallation)) {
    695659        return $vsWhereFoundInstallation->{installationPath};
    696     }
    697     return undef;
    698 }
    699 
    700 sub visualStudioInstallDirLegacy
    701 {
    702     pickLegacyVisualStudioInstallation();
    703     if (defined($vsWhereLegacyInstallation)) {
    704         return $vsWhereLegacyInstallation->{installationPath};
    705660    }
    706661    return undef;
     
    722677        }
    723678    }
    724     return File::Spec->catdir(programFilesPathX86(), "Microsoft Visual Studio 14.0");
     679    return undef;
    725680}
    726681
     
    729684    return $msBuildInstallDir if defined $msBuildInstallDir;
    730685
    731     my $version = visualStudioVersion();
    732     if ($version >= 15.0) {
    733         my $installDir = visualStudioInstallDir();
    734         $msBuildInstallDir = File::Spec->catdir($installDir,
    735             "MSBuild", $version, "bin");
    736     } else {
    737         $msBuildInstallDir = File::Spec->catdir(programFilesPathX86(),
    738             "MSBuild", "14.0", "Bin")
    739     }
     686    my $installDir = visualStudioInstallDir();
     687    $msBuildInstallDir = File::Spec->catdir($installDir,
     688        "MSBuild", "15.0", "bin");
    740689
    741690    chomp($msBuildInstallDir = `cygpath "$msBuildInstallDir"`) if isCygwin();
     
    743692    print "Using MSBuild: $msBuildInstallDir\n";
    744693    return $msBuildInstallDir;
    745 }
    746 
    747 sub visualStudioVersion
    748 {
    749     return $vsVersion if defined $vsVersion;
    750 
    751     my $installDir = visualStudioInstallDir();
    752     $vsVersion = visualStudioVersionFromInstallDir($installDir);
    753 
    754     print "Using Visual Studio $vsVersion\n";
    755     return $vsVersion;
    756 }
    757 
    758 sub visualStudioVersionFromInstallDir
    759 {
    760     my ($dir) = @_;
    761     my $version;
    762 
    763     if ($dir =~ m|Microsoft Visual Studio[/\\]2017|) {
    764         $version = "15.0";
    765     }
    766 
    767     if (!defined($version)) {
    768         if ($dir =~ /Microsoft Visual Studio ([0-9]+\.[0-9]*)/) {
    769             $version = $1;
    770         }
    771     }
    772 
    773     return $version;
    774694}
    775695
     
    18591779        if (!defined $ENV{'WEBKIT_LIBRARIES'} || !$ENV{'WEBKIT_LIBRARIES'}) {
    18601780            print "Warning: You must set the 'WebKit_Libraries' environment variable\n";
    1861             print "         to be able build WebKit from within Visual Studio 2013 and newer.\n";
     1781            print "         to be able build WebKit from within Visual Studio 2017 and newer.\n";
    18621782            print "         Make sure that 'WebKit_Libraries' points to the\n";
    18631783            print "         'WebKitLibraries/win' directory, not the 'WebKitLibraries/' directory.\n\n";
     
    18651785        if (!defined $ENV{'WEBKIT_OUTPUTDIR'} || !$ENV{'WEBKIT_OUTPUTDIR'}) {
    18661786            print "Warning: You must set the 'WebKit_OutputDir' environment variable\n";
    1867             print "         to be able build WebKit from within Visual Studio 2013 and newer.\n\n";
     1787            print "         to be able build WebKit from within Visual Studio 2017 and newer.\n\n";
    18681788        }
    18691789        if (!defined $ENV{'MSBUILDDISABLENODEREUSE'} || !$ENV{'MSBUILDDISABLENODEREUSE'}) {
     
    18861806    my $programFilesPath = programFilesPath();
    18871807    my $visualStudioPath = File::Spec->catfile(visualStudioInstallDir(), qw(Common7 IDE devenv.com));
    1888     if (-e $visualStudioPath) {
    1889         # Visual Studio is installed;
    1890         if (visualStudioVersion() eq "12") {
    1891             $visualStudioPath = File::Spec->catfile(visualStudioInstallDir(), qw(Common7 IDE devenv.exe));
    1892         }
    1893     } else {
     1808    if (!-e $visualStudioPath) {
    18941809        # Visual Studio not found, try VC++ Express
    18951810        $visualStudioPath = File::Spec->catfile(visualStudioInstallDir(), qw(Common7 IDE WDExpress.exe));
     
    18981813            print "Cannot find '$visualStudioPath'\n";
    18991814            print "Please execute the file 'vcvars32.bat' from\n";
    1900             print "'$programFilesPath\\Microsoft Visual Studio 14.0\\VC\\bin\\'\n";
     1815            print "your Visual Studio 2017 installation\n";
    19011816            print "to setup the necessary environment variables.\n";
    19021817            print "*************************************************************\n";
     
    22252140        }
    22262141    } elsif (isAnyWindows() && isWin64()) {
    2227         if (visualStudioVersion() >= 15) {
    2228             push @args, '-G "Visual Studio 15 2017 Win64"';
    2229         } else {
    2230             push @args, '-G "Visual Studio 14 2015 Win64"';
    2231         }
     2142        push @args, '-G "Visual Studio 15 2017 Win64"';
    22322143    }
    22332144    # Do not show progress of generating bindings in interactive Ninja build not to leave noisy lines on tty
Note: See TracChangeset for help on using the changeset viewer.