Skip to content

Add support for Windows ARM64 - #90

Merged
amaitland merged 4 commits into
cefsharp:masterfrom
kpreisser:win-arm64
Jan 15, 2021
Merged

amaitland merged 4 commits into
cefsharp:masterfrom
kpreisser:win-arm64

Conversation

@kpreisser

@kpreisser kpreisser commented Jan 14, 2021 •

Copy link
Copy Markdown
Contributor

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

@amaitland amaitland left a comment

Copy link
Copy Markdown
Member

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.

Comment thread build.ps1
@amaitland

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

@kpreisser

kpreisser commented Jan 15, 2021 •

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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