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

A bunch of improvements to native library builds #2049

Merged
merged 107 commits into from
Apr 18, 2024
Merged

A bunch of improvements to native library builds #2049

merged 107 commits into from
Apr 18, 2024

Conversation

alexrp
Copy link
Collaborator

@alexrp alexrp commented Apr 12, 2024

  • Adds OpenAL Soft native build script.
  • Extends platform coverage for most native packages.
  • Adds symbol stripping to most Linux/macOS native binaries.
  • Changes all native binaries to be built with -O3.
  • Builds SDL with dynamically-loaded X11 and Wayland support.
  • Excludes some unnecessary churn during native builds (tests, examples, etc).
  • Cleans up some of the build scripts to be table-driven.
  • Drops linux-x86 support (was never officially supported by .NET).

Contributes to #727.
Closes #2015.
Closes #2016.

@alexrp alexrp linked an issue Apr 13, 2024 that may be closed by this pull request
38 tasks
@alexrp alexrp force-pushed the feature/natives branch 15 times, most recently from a427837 to fc5dacb Compare April 14, 2024 03:57
@alexrp alexrp marked this pull request as ready for review April 14, 2024 04:00
@alexrp alexrp requested a review from a team as a code owner April 14, 2024 04:00
@Perksey
Copy link
Member

Perksey commented Apr 14, 2024

Just going to kick off the builds for the purposes of review - just close the PRs as they're opened, I'm only interested in the checkmarks.

Copy link
Member

@Perksey Perksey left a comment

Choose a reason for hiding this comment

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

Nothing like a nice glass of Bailey's to go along with an evening code review (it's a good thing I found no comments because I drank the last bit and import prices in Texas are ridiculous)

@Beyley PTAL

@Perksey Perksey requested a review from Beyley April 14, 2024 04:50
@alexrp alexrp force-pushed the feature/natives branch 2 times, most recently from 27c4f51 to e9d8ec6 Compare April 14, 2024 11:07
Copy link
Member

@Perksey Perksey left a comment

Choose a reason for hiding this comment

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

Latest changes are fine provided @Beyley agrees

alexrp and others added 15 commits April 14, 2024 19:06
The sndio backend takes a hard dependency on libsndio.so, unlike most other
backends which load libraries dynamically. We don't want our libopenal.so to
require users to install sndio.
This allows the build to pick them up and enable support.
This package is not multiarch-compatible in 22.04, so prioritize amd64.
This package is not multiarch-compatible in 22.04, so prioritize amd64.
…Fri Mar 15 00:10:50 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_VMAPPLE
Copy link
Contributor

@Beyley Beyley left a comment

Choose a reason for hiding this comment

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

only thing left is just a missing comment, add that and ale li pona tawa mi, really nice work!

@Perksey
Copy link
Member

Perksey commented Apr 18, 2024

Maybe it's worth factoring out the Ubuntu extras as well into a bash script?

@alexrp
Copy link
Collaborator Author

alexrp commented Apr 18, 2024

Maybe it's worth factoring out the Ubuntu extras as well into a bash script?

The proper way to handle the duplication of logic in the native workflows is to switch them over to GitHub's reusable workflows feature, but that's a project for another day.

Copy link
Contributor

@Beyley Beyley left a comment

Choose a reason for hiding this comment

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

pona

@Perksey
Copy link
Member

Perksey commented Apr 18, 2024

Force merging because CLA is sleeping

@Perksey Perksey enabled auto-merge (squash) April 18, 2024 02:51
@Perksey Perksey disabled auto-merge April 18, 2024 02:51
@Perksey Perksey merged commit aea6c51 into main Apr 18, 2024
8 of 27 checks passed
alexrp added a commit that referenced this pull request Apr 18, 2024
@Perksey Perksey deleted the feature/natives branch April 18, 2024 04:08
alexrp added a commit that referenced this pull request Apr 18, 2024
Perksey pushed a commit that referenced this pull request Apr 21, 2024
* Native: Also include *.json files in PRs (e.g. vk_swiftshader_icd.json).

* Native/SwiftShader: Update submodule to 764410d.

* Native/SwiftShader: Build for win-arm64.

* Native/SwiftShader: Update packaging paths in Silk.NET.Vulkan.SwiftShader.Native.

This was missed in #2049.

* Native/Vulkan Loader: Build for win-arm64.

Vulkan Loader has GAS-style assembly that is essential to it functioning
correctly, so to make things simple, we build on Linux using llvm-mingw.

* Native/SwiftShader: Expand on a comment in the NUKE build script.

* Native: Use absolute tool paths in aarch64-w64-mingw32.cmake.

* Native: Re-run CMake-based workflows when build/cmake/* changes are pushed.

* Native/Vulkan Loader: Remove llvm-mingw archive after extraction.

* Native/Vulkan Loader: Pass extra glob path to the win-arm64 binary.

This is needed since the default globs only include *.so on Linux.

* New binaries for SwiftShader on Darwin 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:50 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_VMAPPLE

* Native/Vulkan Loader: Update submodule to v1.3.281.

This brings it in line with our Vulkan-Headers submodule.

* Native/Vulkan-Loader: Update submodule to 6d9e995.

This brings in a number of build system fixes that we need for win-arm64. This
commit is just prior to the update to Vulkan v1.3.282.

* Native/Vulkan Loader: Fix path to vulkan-1.dll for win-arm64.

* New binaries for SwiftShader on Microsoft Windows 10.0.20348

* Native/Vulkan Loader: Fix path to vulkan-1.dll for win-arm64, take 2.

* New binaries for Vulkan Loader on Darwin 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:50 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_VMAPPLE

* New binaries for Vulkan Loader on Linux 6.5.0-1018-azure #19~22.04.2-Ubuntu SMP Thu Mar 21 16:45:46 UTC 2024

* New binaries for Vulkan Loader on Microsoft Windows 10.0.20348

* New binaries for SwiftShader on Linux 6.5.0-1018-azure #19~22.04.2-Ubuntu SMP Thu Mar 21 16:45:46 UTC 2024

* Native: Simplify `git add` glob for changed native binaries.

* Native: Simplify NuGet packaging projects.

* Native: Set CMAKE_ASM_COMPILER in all toolchain files.

---------

Co-authored-by: The Silk.NET Automaton <9011267+dotnet-bot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
4 participants