Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Windows ARM64 #90

Merged
merged 4 commits into from
Jan 15, 2021
Merged

Conversation

kpreisser
Copy link
Contributor

@kpreisser kpreisser commented Jan 14, 2021

Issue cefsharp/CefSharp#2944

  • Upgrade to 88.1.2+gac8e5f0+chromium-88.0.4324.27.
  • Add win-arm64 artifacts to NuGet package chromiumembeddedframework and to cef.redist.arm64.
  • Build win-arm64 version of libcef_dll_wrapper.lib when using the v141 (VS 2017) or v142 (VS 2019) toolchain (for package cef.sdk).

With this change, the ARM64 libcef_dll_wrapper.lib builds successfully for me when using the v141 (VS 2017) and v142 (VS 2019) toolchains (when VC++ ARM64 build tools are installed).

Thank you!

- Build win-arm64 version of libcef_dll_wrapper.lib when using the v141 (VS 2017) or v142 (VS 2019) toolchain.

Issue cefsharp/CefSharp#2944
@kpreisser kpreisser marked this pull request as ready for review January 14, 2021 20:32
Copy link
Member

@amaitland amaitland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one! Thanks.

We'll also need to create a cef.redist Nuget package for use internally.

AppVeyor currently only builds VS2015 and VS2017 targets, hopefully it has the arm64 tools installed.

build.ps1 Show resolved Hide resolved
@amaitland
Copy link
Member

Let me know when you are happy and I'll merge this and tag a release, easiest way to have AppVeyor generate a build, see what happens.

@kpreisser
Copy link
Contributor Author

Let me know when you are happy and I'll merge this and tag a release, easiest way to have AppVeyor generate a build, see what happens.

👍
I think the change is good to go. If Appveyor build fails e.g. due to missing ARM64 build tools, we can probably comment-out the two added Msvs calls using arm64 for now.

Thank you!

@amaitland amaitland merged commit 91e998c into cefsharp:master Jan 15, 2021
@kpreisser kpreisser deleted the win-arm64 branch January 15, 2021 07:30
@amaitland
Copy link
Member

@kpreisser
Copy link
Contributor Author

kpreisser commented Jan 15, 2021

The build failed when trying to build for x86 with v140 toolchain (but the arm64 build with v141 toolchain apparently succeeded):

C:\projects\cef-binary-5r1rw>"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\..\..\vc\vcvarsall.bat" x86   && set  1>"C:\Users\appveyor\AppData\Local\Temp\1\tmp33BB.tmp" 
Caught an exception: The input line is too long.
	Exception Type: System.Management.Automation.RemoteException
	Stack Trace: at Invoke-BatchFile, C:\projects\cef-binary-5r1rw\build.ps1: line 118
	at Msvs, C:\projects\cef-binary-5r1rw\build.ps1: line 378
	at VSX, C:\projects\cef-binary-5r1rw\build.ps1: line 454
	at <ScriptBlock>, C:\projects\cef-binary-5r1rw\build.ps1: line 925
	at <ScriptBlock>, <No file>: line 1

This is probably the same issue as described here (Path environment variable is becoming too long as vcvarsall.bat always appends to it).
In that case, maybe it will work if we cache the original value of the Path, Lib, LibPath, Include environment variables, and reset them after the Msvs call is complete. What do you think?

@amaitland
Copy link
Member

The build failed when trying to build for x86 with v140 toolchain (but the arm64 build with v141 toolchain apparently succeeded):

Looks promising though 👍

In that case, maybe it will work if we cache the original value of the Path, Lib, LibPath, Include environment variables, and reset them after the Msvs call is complete. What do you think?

Happy to try that. Quick search and I see plenty of people attempting to reset the environment. We could potentially spawn a VS developer tools window for each build, they'd be isolated, lot more work involved though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants