o3de / o3de-azslc

Amazon Shader Language (AZSL) Compiler
Other
23 stars 14 forks source link

Improved project generation and compilation for Linux. #23

Closed galibzon closed 2 years ago

galibzon commented 2 years ago

In Linux, AZSLc can now be compiled with clang-12. By default it uses g++.

Optimized the git clone operation of ANTLR to do a shallow clone.

Added a helper script 'clean_build.sh' to clean the linux/mac build folders.

Signed-off-by: galibzon garrieta@amazon.com

jeremyong-az commented 2 years ago

Is there a reason clang-12 specifically is required? When using gcc for example, no version is stipulated.

galibzon commented 2 years ago

The only reason to use clang-12 is that it is the version being used when compiling O3DE for Linux. In ubuntu20.04 the "clang" command defaults to clang-10. Granted, compiling azslc with clang-12 is just for exploratory purposes. gcc is still the default in case "clang" is not provided when executing "prepare_solution_linux.sh". With regards to gcc, just kept it the way it was to use the default.

jeremyong-az commented 2 years ago

OK, it may be worth revisiting this assumption in the future, since other distros don't necessarily alias the clang compilers the same way Ubuntu does (in fact, most don't) and we would want this project to be easily usable on other distros also.