Skip to content

Commit

Permalink
Cherry pick V8 fixes (62) (#4996)
Browse files Browse the repository at this point in the history
* Cherry-pick "Remove V8 and Hermes by default"

* Cherry-pick "Reenable V8 for desktop projects"

* Change files

* remove older change file

Co-authored-by: tudorm <tudorm@microsoft.com>
  • Loading branch information
tudorms and tudorm authored May 23, 2020
1 parent 6c3bffa commit 6367e4b
Show file tree
Hide file tree
Showing 32 changed files with 615 additions and 526 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "prerelease",
"comment": "Cherry-pick \"Remove V8 and Hermes by default\"",
"packageName": "react-native-windows",
"email": "tudorm@microsoft.com",
"dependentChangeType": "patch",
"date": "2020-05-22T21:51:34.193Z"
}
2 changes: 1 addition & 1 deletion packages/E2ETest/windows/ReactUWPTestApp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TreeDumpLibrary", "TreeDump
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
..\..\..\vnext\Microsoft.ReactNative.SharedManaged\Microsoft.ReactNative.SharedManaged.projitems*{67a1076f-7790-4203-86ea-4402ccb5e782}*SharedItemsImports = 13
..\..\..\vnext\ReactWindowsCore\ReactWindowsCore.vcxitems*{11c084a3-a57c-4296-a679-cac17b603144}*SharedItemsImports = 4
..\..\..\vnext\JSI\Shared\JSI.Shared.vcxitems*{a62d504a-16b8-41d2-9f19-e2e86019e5e4}*SharedItemsImports = 4
..\..\..\vnext\Microsoft.ReactNative.SharedManaged\Microsoft.ReactNative.SharedManaged.projitems*{abbb0407-0e82-486f-94ce-710900fcaadc}*SharedItemsImports = 4
..\..\..\vnext\Microsoft.ReactNative.SharedManaged\Microsoft.ReactNative.SharedManaged.projitems*{c0a6bd9c-3ee5-4b12-8ce4-cee95178539c}*SharedItemsImports = 4
Expand Down
2 changes: 2 additions & 0 deletions packages/playground/windows/playground-win32.sln
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "..\..\..\vnext\Co
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
..\..\..\vnext\ReactWindowsCore\ReactWindowsCore.vcxitems*{11c084a3-a57c-4296-a679-cac17b603144}*SharedItemsImports = 4
..\..\..\vnext\Chakra\Chakra.vcxitems*{2d5d43d9-cffc-4c40-b4cd-02efb4e2742b}*SharedItemsImports = 4
..\..\..\vnext\Mso\Mso.vcxitems*{2d5d43d9-cffc-4c40-b4cd-02efb4e2742b}*SharedItemsImports = 4
..\..\..\vnext\Shared\Shared.vcxitems*{2d5d43d9-cffc-4c40-b4cd-02efb4e2742b}*SharedItemsImports = 4
..\..\..\vnext\JSI\Shared\JSI.Shared.vcxitems*{a62d504a-16b8-41d2-9f19-e2e86019e5e4}*SharedItemsImports = 4
..\..\..\vnext\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems*{da8b35b3-da00-4b02-bde6-6a397b3fd46b}*SharedItemsImports = 9
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<SDLCheck>true</SDLCheck>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions Condition="'$(USE_V8)'=='true'">USE_V8;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(USE_HERMES)'=='true'">USE_HERMES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>shell32.lib;user32.lib;windowsapp.lib;$(ReactNativeWindowsDir)target\$(PlatformTarget)\$(Configuration)\ReactUWP\React.uwp.lib;%(AdditionalDependenices)</AdditionalDependencies>
Expand Down
1 change: 1 addition & 0 deletions packages/playground/windows/playground.sln
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
..\..\..\vnext\JSI\Shared\JSI.Shared.vcxitems*{0cc28589-39e4-4288-b162-97b959f8b843}*SharedItemsImports = 9
..\..\..\vnext\ReactWindowsCore\ReactWindowsCore.vcxitems*{11c084a3-a57c-4296-a679-cac17b603144}*SharedItemsImports = 4
..\..\..\vnext\Shared\Shared.vcxitems*{2049dbe9-8d13-42c9-ae4b-413ae38fffd0}*SharedItemsImports = 9
..\..\..\vnext\Microsoft.ReactNative.SharedManaged\Microsoft.ReactNative.SharedManaged.projitems*{67a1076f-7790-4203-86ea-4402ccb5e782}*SharedItemsImports = 13
..\..\..\vnext\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems*{6b6aa847-b32f-41ac-9d3b-48a8cdfa8ade}*SharedItemsImports = 4
Expand Down
19 changes: 2 additions & 17 deletions vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<ProjectGuid>{88BAB0FA-E1AC-4DA7-A30C-F91702A8EADB}</ProjectGuid>
<ProjectName>React.Windows.Desktop.DLL</ProjectName>
<TargetName>react-native-win32</TargetName>
<USE_V8>true</USE_V8>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(ReactNativeWindowsDir)PropertySheets\React.Cpp.props" />
Expand Down Expand Up @@ -62,10 +63,8 @@
WIN32;
_WINDOWS;
_USRDLL;
REACTNATIVEWIN32_EXPORTS;
FOLLY_NO_CONFIG;
NOMINMAX;
GLOG_NO_ABBREVIATED_SEVERITIES;
_HAS_AUTO_PTR_ETC;
CHAKRACORE;
RN_EXPORT=;
Expand Down Expand Up @@ -123,21 +122,6 @@
<None Include="react-native-win32.x86.def" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Common\Common.vcxproj">
<Project>{fca38f3c-7c73-4c47-be4e-32f77fa8538d}</Project>
</ProjectReference>
<ProjectReference Include="..\Folly\Folly.vcxproj">
<Project>{A990658C-CE31-4BCC-976F-0FC6B1AF693D}</Project>
</ProjectReference>
<ProjectReference Include="..\FollyWin32\FollyWin32.vcxproj">
<Project>{74085F13-2DDE-45E5-A0CA-927AC9D0B953}</Project>
</ProjectReference>
<ProjectReference Include="..\ReactCommon\ReactCommon.vcxproj">
<Project>{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}</Project>
</ProjectReference>
<ProjectReference Include="..\ReactWindowsCore\ReactWindowsCore.vcxproj">
<Project>{11C084A3-A57C-4296-A679-CAC17B603144}</Project>
</ProjectReference>
<ProjectReference Include="..\Desktop\React.Windows.Desktop.vcxproj">
<Project>{95048601-C3DC-475F-ADF8-7C0C764C10D5}</Project>
</ProjectReference>
Expand Down Expand Up @@ -170,6 +154,7 @@
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Warning Condition="'$(USE_V8)' != 'true'" Text="Building desktop project without USE_V8 (value is '$(USE_V8)')" />
<Error Condition="!Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets'))" />
<Error Condition="!Exists('$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets'))" />
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.ChakraCore.vc140.1.11.13\build\native\Microsoft.ChakraCore.vc140.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.ChakraCore.vc140.1.11.13\build\native\Microsoft.ChakraCore.vc140.targets'))" />
Expand Down
1 change: 1 addition & 0 deletions vnext/Desktop.DLL/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
<package id="ChakraCore.Debugger" version="0.0.0.43" targetFramework="native" />
<package id="Microsoft.ChakraCore.vc140" version="1.11.13" targetFramework="native" developmentDependency="true" />
<package id="ReactWindows.OpenSSL.StdCall.Static" version="1.0.2-p.2" targetFramework="native" />
<package id="ReactNative.V8Jsi.Windows" version="0.2.7" targetFramework="native" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<ProjectGuid>{E0D269B4-D7F0-4C4E-92CD-B2C06109A2BB}</ProjectGuid>
<ProjectName>React.Windows.Desktop.IntegrationTests</ProjectName>
<CppWinRTOptimized>true</CppWinRTOptimized>
<USE_V8>true</USE_V8>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(ReactNativeWindowsDir)PropertySheets\React.Cpp.props" />
Expand Down Expand Up @@ -54,10 +55,8 @@
_WIN32_WINNT=$(WinVer);
WIN32;
_WINDOWS;
REACTNATIVEWIN32_EXPORTS;
FOLLY_NO_CONFIG;
NOMINMAX;
GLOG_NO_ABBREVIATED_SEVERITIES;
_HAS_AUTO_PTR_ETC;
CHAKRACORE;
RN_PLATFORM=windesktop;
Expand Down Expand Up @@ -103,21 +102,9 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Common\Common.vcxproj">
<Project>{fca38f3c-7c73-4c47-be4e-32f77fa8538d}</Project>
</ProjectReference>
<ProjectReference Include="..\Folly\Folly.vcxproj">
<Project>{A990658C-CE31-4BCC-976F-0FC6B1AF693D}</Project>
</ProjectReference>
<ProjectReference Include="..\FollyWin32\FollyWin32.vcxproj">
<Project>{74085F13-2DDE-45E5-A0CA-927AC9D0B953}</Project>
</ProjectReference>
<ProjectReference Include="..\ReactCommon\ReactCommon.vcxproj">
<Project>{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}</Project>
</ProjectReference>
<ProjectReference Include="..\ReactWindowsCore\ReactWindowsCore.vcxproj">
<Project>{11C084A3-A57C-4296-A679-CAC17B603144}</Project>
</ProjectReference>
<ProjectReference Include="..\IntegrationTests\React.Windows.IntegrationTests.vcxproj">
<Project>{700A84FD-F92A-43F1-8D06-B0E0745DF9B5}</Project>
</ProjectReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@
_WIN32_WINNT=$(WinVer);
WIN32;
_WINDOWS;
REACTNATIVEWIN32_EXPORTS;
FOLLY_NO_CONFIG;
NOMINMAX;
GLOG_NO_ABBREVIATED_SEVERITIES;
_HAS_AUTO_PTR_ETC;
CHAKRACORE;
RN_EXPORT=;
Expand Down
6 changes: 3 additions & 3 deletions vnext/Desktop/React.Windows.Desktop.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<CppWinRTProjectLanguage>C++/WinRT</CppWinRTProjectLanguage>
<CppWinRTNamespaceMergeDepth>2</CppWinRTNamespaceMergeDepth>
<CppWinRTUsePrefixes>true</CppWinRTUsePrefixes>
<USE_V8>true</USE_V8>
</PropertyGroup>
<PropertyGroup Label="Permissive">
<ENABLEPermissive>true</ENABLEPermissive>
Expand Down Expand Up @@ -71,10 +72,8 @@
_WIN32_WINNT=$(WinVer);
WIN32;
_WINDOWS;
REACTNATIVEWIN32_EXPORTS;
FOLLY_NO_CONFIG;
NOMINMAX;
GLOG_NO_ABBREVIATED_SEVERITIES;
_HAS_AUTO_PTR_ETC;
CHAKRACORE;
RN_PLATFORM=win32;
Expand Down Expand Up @@ -178,7 +177,7 @@
<ProjectReference Include="..\ReactCommon\ReactCommon.vcxproj">
<Project>{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}</Project>
</ProjectReference>
<ProjectReference Include="..\ReactWindowsCore\ReactWindowsCore.vcxproj">
<ProjectReference Include="..\ReactWindowsCore\ReactWindowsCore-Desktop.vcxproj">
<Project>{11C084A3-A57C-4296-A679-CAC17B603144}</Project>
</ProjectReference>
</ItemGroup>
Expand All @@ -195,6 +194,7 @@
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Warning Condition="'$(USE_V8)' != 'true'" Text="Building desktop project without USE_V8 (value is '$(USE_V8)')" />
<Error Condition="!Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets'))" />
<Error Condition="!Exists('$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets'))" />
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.ChakraCore.vc140.1.11.13\build\native\Microsoft.ChakraCore.vc140.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.ChakraCore.vc140.1.11.13\build\native\Microsoft.ChakraCore.vc140.targets'))" />
Expand Down
3 changes: 0 additions & 3 deletions vnext/IntegrationTests/React.Windows.IntegrationTests.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@
<ProjectReference Include="..\Common\Common.vcxproj">
<Project>{fca38f3c-7c73-4c47-be4e-32f77fa8538d}</Project>
</ProjectReference>
<ProjectReference Include="..\ReactWindowsCore\ReactWindowsCore.vcxproj">
<Project>{11C084A3-A57C-4296-A679-CAC17B603144}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ClCompile Include="ControllableMessageQueueThread.cpp" />
Expand Down
31 changes: 2 additions & 29 deletions vnext/JSI.Desktop.UnitTests/JSI.Desktop.UnitTests.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{6f354505-fe3a-4bd2-a9a6-d12bbf37a85c}</ProjectGuid>
<ProjectName>JSI.Desktop.UnitTests</ProjectName>
<USE_V8>true</USE_V8>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(ReactNativeWindowsDir)PropertySheets\React.Cpp.props" />
Expand All @@ -25,16 +26,9 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<!-- We cannot include Warnings.props here because Google Test only builds at warning level 3. -->
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
<Import Project="..\Chakra\Chakra.vcxitems" Label="Shared" />
<Import Project="..\Shared\Shared.vcxitems" Label="Shared" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<IncludePath>$(ReactNativeWindowsDir);$(ReactNativeWindowsDir)Common;$(ReactNativeWindowsDir)stubs;$(FollyDir);$(ReactNativeDir)\ReactCommon;$(JSI_Source);$(ReactNativeWindowsDir)ReactWindowsCore;$(ReactNativeWindowsDir)\ReactWindowsCore\tracing;$(ReactNativeWindowsDir)include\ReactWindowsCore;$(ReactNativeWindowsDir)Desktop;$(ReactNativeWindowsDir)IntegrationTests;$(ReactNativeWindowsDir)JSI\Shared;$(MSBuildProjectDirectory);$(ReactNativeDir)\ReactCommon\callinvoker;$(IncludePath)</IncludePath>
<LinkIncremental>true</LinkIncremental>
Expand All @@ -52,10 +46,8 @@
_WIN32_WINNT=$(WinVer);
WIN32;
_WINDOWS;
REACTNATIVEWIN32_EXPORTS;
FOLLY_NO_CONFIG;
NOMINMAX;
GLOG_NO_ABBREVIATED_SEVERITIES;
_HAS_AUTO_PTR_ETC;
CHAKRACORE;
RN_EXPORT=;
Expand All @@ -72,16 +64,8 @@
</ClCompile>
<Link>
<AdditionalOptions>-minpdbpathlen:256</AdditionalOptions>
<!--
comsuppw.lib - _com_util::ConvertStringToBSTR
delayimp.lib -
Winhttp.lib - WebSocket resource implementation
-->
<AdditionalDependencies>
comsuppw.lib;
delayimp.lib;
Shlwapi.lib;
Winhttp.lib;
%(AdditionalDependencies)
</AdditionalDependencies>
<GenerateDebugInformation>DebugFull</GenerateDebugInformation>
Expand Down Expand Up @@ -118,21 +102,9 @@
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Common\Common.vcxproj">
<Project>{fca38f3c-7c73-4c47-be4e-32f77fa8538d}</Project>
</ProjectReference>
<ProjectReference Include="..\Folly\Folly.vcxproj">
<Project>{A990658C-CE31-4BCC-976F-0FC6B1AF693D}</Project>
</ProjectReference>
<ProjectReference Include="..\FollyWin32\FollyWin32.vcxproj">
<Project>{74085F13-2DDE-45E5-A0CA-927AC9D0B953}</Project>
</ProjectReference>
<ProjectReference Include="..\ReactCommon\ReactCommon.vcxproj">
<Project>{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}</Project>
</ProjectReference>
<ProjectReference Include="..\ReactWindowsCore\ReactWindowsCore.vcxproj">
<Project>{11C084A3-A57C-4296-A679-CAC17B603144}</Project>
</ProjectReference>
<ProjectReference Include="..\Desktop\React.Windows.Desktop.vcxproj">
<Project>{95048601-C3DC-475F-ADF8-7C0C764C10D5}</Project>
</ProjectReference>
Expand All @@ -157,6 +129,7 @@
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Warning Condition="'$(USE_V8)' != 'true'" Text="Building desktop project without USE_V8 (value is '$(USE_V8)')" />
<Error Condition="!Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets'))" />
<Error Condition="!Exists('$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets'))" />
<Error Condition="!Exists('$(SolutionDir)packages\ChakraCore.Debugger.0.0.0.43\build\native\ChakraCore.Debugger.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\ChakraCore.Debugger.0.0.0.43\build\native\ChakraCore.Debugger.targets'))" />
Expand Down
1 change: 1 addition & 0 deletions vnext/JSI.Desktop.UnitTests/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
<package id="Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn" version="1.8.1" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.190730.2" targetFramework="native" />
<package id="ReactWindows.OpenSSL.StdCall.Static" version="1.0.2-p.2" targetFramework="native" />
<package id="ReactNative.V8Jsi.Windows" version="0.2.7" targetFramework="native" />
</packages>
Loading

0 comments on commit 6367e4b

Please sign in to comment.