* support clang 15.0.7
* Fix Premake archive logic to work with official releases.
* Try and upgrade CI to latest OS versions.
* Try and fix LLD link call in parser.
* CI fixes.
* Enable VS 2019 and VS 2022 for LLVM windows workflow.
* Update to a more recent LLVM revision.
* More build fixes.
* Use the system linker for linking symbols libraries outside Windows.
Builtin lld is giving some weird linking errors when linking with the
new LLVM version. We probably need to set some custom options. Using the
system linker should be a better idea anyway, more robust and future
proof.
---------
Co-authored-by: you74674 <you74674@gmail.com>
- Added support for building with Clang and LLD
- Switched to use csc.exe Roslyn compiler under Mono
- Disable most of the support for explicit pre-C++11 ABI since we do not
need it anymore
Compiler kind (always gcc for now) and version (4.8/4.9/5/6/7) is now always included in llvm package name. Additionally if `--no-cxx11-abi` flag is passed to premake then package name will end wiht "-no-cxx11".
Prebuilt LLVM binaries package for CI needs renaming to `llvm-9bde5f-linux-x64-gcc-4.8-Release.tar.xz`.
This change prevents premake from inserting /usr/lib64 search path on linux. GCC does not need this path specified compiler automatically knows where to look for system libs. Insertion of this path causes issues system has clang/llvm libs installed. Build would link to system libraries instead of custom required by CppSharp.
Also this patch revealed that linking to `pthread`, `z` and `tinfo` libraries on linux is not necessary and disabling them in LLVM build config works. Linking to these libs was removed. As you probably have guessed in the past CppSharp would throw `DllNotFoundException` due to missing symbols because it linked to system LLVM libs, not custom in-tree LLVM build.
GCC version is checked, if version is 4.8 or lower then cxx11 ABI is disabled. Added new `--no-cxx11-abi` option. It explicitly disables cxx11 ABI even on new compilers. This option is also taken into account when building LLVM.
These libs are not used by current official CppSharp binary distributions of LLVM, however building LLVM locally will pick these libs up and link to them if they are installed on local system. Since premake does not link to any of those libs linking to local LLVM build will cause `DllNotFoundException` due to missing symbols.
This fixes the dreaded CMake error:
CMake Error at tools/clang/tools/clang-offload-bundler/CMakeLists.txt:18 (add_dependencies):
Cannot add target-level dependencies to non-existent target "clang".