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

[FEATURE] Add optional clang build #13

Open
tormento opened this issue Jun 8, 2021 · 5 comments
Open

[FEATURE] Add optional clang build #13

tormento opened this issue Jun 8, 2021 · 5 comments

Comments

@tormento
Copy link

tormento commented Jun 8, 2021

Latest MSYS2 added clang, please consider to add as alternative.

@nkh0472
Copy link
Contributor

nkh0472 commented Jun 8, 2021

I guess the request will not be implemented unless the necessary reasons are given. Someone has asked a similar question about tool chain before, see #4 .

There are so many compilers, such as gcc, clang, msvc, llvm, icc and so on. Generally, the performance improvement brought by different compilers can be ignored; However, different compilers have different language implementations, so choosing an untested compiler will bring predictable potential problems!

@tormento
Copy link
Author

tormento commented Jun 8, 2021

MSVC AFAIK is not available on all platforms. If I would choose a preferred one, it would be ICC.

CLANG usually produces faster builds and, in the case of an encoder, every ms saved is makes a good day.

@nkh0472
Copy link
Contributor

nkh0472 commented Jun 8, 2021

Both fdk-aac and fdkaac seem tested or even developed under MSVC.
Since this script is only for Windows, the cross-platform compatibility for other platforms is no need to consider.

If you care about compiling speed, you may need to use native Linux to do the cross-compile, or at least try MSVC.
The worst choice for compiling speed is MSYS2, no matter using gcc or clang.

As I said, if you want to choose a different compiler, you need to test it yourself and modify the part of the code that does not meet expectations.
Of course, if you have done this, you are welcome to submit your code to this script and submit a code compatibility report to the upstream in their readme.

@tormento
Copy link
Author

tormento commented Jun 8, 2021

@nkh0472 I meant encoding, not building, speed.

@nkh0472
Copy link
Contributor

nkh0472 commented Jun 10, 2021

No one is obliged to realize these wishful and unrealistic ideas for you.

It's not that we chose GCC, but that the official only supported GCC. You need to open such issue in their repo instead of here.

Simply search gcc in their repo,
https://github.com/mstorsjo/fdk-aac/search?q=gcc
https://github.com/mstorsjo/fdk-aac/blob/801f67f671929311e0c9952c5f92d6e147c7b003/ChangeLog#L22-L23
https://github.com/mstorsjo/fdk-aac/blob/5329a829a0349bdf76a743efbb2d3f416b285e94/libFDK/include/FDK_archdef.h#L109-L115

See?

/* Use single macro (the GCC built in macro) for architecture identification 
* independent of the particular toolchain */

https://github.com/nu774/fdkaac/search?q=gcc
https://github.com/nu774/fdkaac/blob/fdf5c2f251a6b35dc2b3df561cfd247829b98f5d/ChangeLog#L147
https://github.com/nu774/fdkaac/blob/fdf5c2f251a6b35dc2b3df561cfd247829b98f5d/m4/lib-link.m4#L134

If you can do all of this, you can use whatever compiler as you want. Just do it yourself.

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

No branches or pull requests

2 participants