-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Core - ARM64 support for .Net 4.8.1 (rebased) #5267
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,16 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <TargetFramework>net462</TargetFramework> | ||
| <OutputType>WinExe</OutputType> | ||
| <Platforms>x86;x64</Platforms> | ||
| <Platforms>x86;x64;arm64</Platforms> | ||
| <PlatformTarget Condition="'$(Platform)' == 'arm64'">arm64</PlatformTarget> | ||
| <GenerateAssemblyInfo>false</GenerateAssemblyInfo> | ||
| <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> | ||
| <SignAssembly>true</SignAssembly> | ||
| <AssemblyOriginatorKeyFile>..\CefSharp.snk</AssemblyOriginatorKeyFile> | ||
| <ApplicationManifest>app.manifest</ApplicationManifest> | ||
| <StartupObject>CefSharp.BrowserSubprocess.Program</StartupObject> | ||
| <RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers> | ||
| <RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup Condition="'$(Configuration)' == 'Debug'"> | ||
|
|
@@ -41,6 +42,6 @@ | |
| </PackageReference> | ||
| </ItemGroup> | ||
| <Target Name="PostBuild" AfterTargets="PostBuildEvent"> | ||
| <Exec Command="if $(PlatformName) == x86 (
 call "$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvars32.bat"
 editbin /largeaddressaware /TSAWARE "$(TargetPath)" 
 sn -R "$(TargetPath)" "$(ProjectDir)..\CefSharp.snk"
) else (
 call "$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvars64.bat"
 editbin /TSAWARE /STACK:8388608 "$(TargetPath)"
 sn -R "$(TargetPath)" "$(ProjectDir)..\CefSharp.snk"
)" /> | ||
| <Exec Command="if $(PlatformName) == x86 (
 call "$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvars32.bat"
 editbin /largeaddressaware /TSAWARE "$(TargetPath)" 
 sn -R "$(TargetPath)" "$(ProjectDir)..\CefSharp.snk"
) else if $(PlatformName) == x64 (
 call "$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvars64.bat"
 editbin /TSAWARE /STACK:8388608 "$(TargetPath)"
 sn -R "$(TargetPath)" "$(ProjectDir)..\CefSharp.snk"
) else if $(PlatformName) == arm64 (
 call "$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvarsamd64_arm64.bat"
 editbin /TSAWARE /STACK:8388608 "$(TargetPath)"
 sn -R "$(TargetPath)" "$(ProjectDir)..\CefSharp.snk"
)" /> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🌐 Web query:
💡 Result: When the host machine is Windows ARM64 and you are targeting ARM64, the recommended approach is to use the Citations:
Use the native ARM64 vcvars bootstrap here. 🤖 Prompt for AI Agents
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CI is only going to cross compile so that's the priority, native compilation support can be added in a follow up PR. show proposed change for future reference.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
For future reference, here’s the shape of the change I had in mind for Line 45, keeping the existing <Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="if $(PlatformName) == x86 (&`#xD`;&`#xA`; call "$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvars32.bat"&`#xD`;&`#xA`; editbin /largeaddressaware /TSAWARE "$(TargetPath)"&`#xD`;&`#xA`; sn -R "$(TargetPath)" "$(ProjectDir)..\CefSharp.snk"&`#xD`;&`#xA`;) else if $(PlatformName) == x64 (&`#xD`;&`#xA`; call "$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvars64.bat"&`#xD`;&`#xA`; editbin /TSAWARE /STACK:8388608 "$(TargetPath)"&`#xD`;&`#xA`; sn -R "$(TargetPath)" "$(ProjectDir)..\CefSharp.snk"&`#xD`;&`#xA`;) else if $(PlatformName) == arm64 (&`#xD`;&`#xA`; if /I "%PROCESSOR_ARCHITECTURE%" == "ARM64" (&`#xD`;&`#xA`; call "$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvarsall.bat" arm64&`#xD`;&`#xA`; ) else (&`#xD`;&`#xA`; call "$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvarsamd64_arm64.bat"&`#xD`;&`#xA`; )&`#xD`;&`#xA`; editbin /TSAWARE /STACK:8388608 "$(TargetPath)"&`#xD`;&`#xA`; sn -R "$(TargetPath)" "$(ProjectDir)..\CefSharp.snk"&`#xD`;&`#xA`;)" />
</Target>That would preserve the current CI path while also handling native ARM64-hosted developer environments later. If you want, I can also open a follow-up issue for that so it doesn’t get lost. |
||
| </Target> | ||
| </Project> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to verify the output with dumpbin