-
Notifications
You must be signed in to change notification settings - Fork 1.6k
build: add -march=native flag for mingw arm64 builds #6347
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
Conversation
|
By doing this, we'll be altering the official builds to use the instruction set specific to the processor running on the CI, correct? This compiler flag should only be used when HandBrake is configured with HandBrake/make/include/gcc.defs Lines 75 to 77 in 1eead5a
We might consider increasing the minimum requirement for the ARM64 version to |
|
Just a note that all of our build servers for HandBrake on Windows are x86_64 so we won't get any benefit in official releases for build time optimisations that rely on being built on a specific platform. |
|
Right. It does not even work with Clang: |
I see. That is right. I'll put it under the --cpu=native flag if that's alright.
That being the case, is it possible to add a build workflow, where we could pass
I am using latest llvm-mingw 19.1.2 and it compiles fine without any issue. But its a ucrt aarch64 build. Let me check with the msvcrt x86_64 build as well |
|
This is not doable, because the result might run only on the machine it was built on. For example if the build machine has SVE, the compiler might use SVE instructions, and that will crash on every other machine that has no SVE. You could set it to Windows for ARM baseline, if the compiler is not already setting it properly. |
|
I think setting |
|
Since HandBrake 1.6.0 you can build with See:
That PR thread has a bunch of discussion about custom CFLAGS and LTO things that also might be of use to you. Anyway, it is technically impossible for us to ship native builds. We have to target a general spec in order for the build to be usable across a wide range of machines for the given macro architecture. I do not believe we intend to ship more narrowly targeted builds at all, but we can discuss this. Of course, anyone can create a native build for their own machine. Some people native + LTO to be beneficial on the order of 1-4%, but it probably only makes sense to create a custom personal build like this if one plans to transcode thousands of videos. |
|
Hello, Warning This pull request appears to be inactive and will be automatically closed within 10 days if no further activity is detected. Thank You, |
|
Hello, Note This pull request has now been closed due to inactivity. Thank You, |
Adds
-march=nativeflag to automatically detect CPU features during build time to generate code optimized specifically for that device's CPU architectureTested on: