- 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
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.
Link `pthread` and `z` on linux as well. Link `tinfo` if `/usr/lib/libtinfo.so` file exists. This is required because despite explicitly disabling these libs in LLVM build config they still somehow get pulled in on some systems. `pthread` and `z` are standard components of every linux distribution therefore linking them unconditionally is OK. `tinfo` may not exist on some systems therefore it's existence is checked first. With this patch finally builds produced on Archlinux no longer result in `DllNotFoundException`.
`get_llvm_build_dir()` returns directory `<llvm_dir>/build`. It is incorrect when using non-packaged LLVM build, because LLVM is built into `'deps/llvm/'..get_llvm_package_name()`. This change fixes issue where using unpackaged LLVM build resulted in `error: ‘StrictFP’ is not a member of ‘llvm::Attribute’`.
At least on linux with gcc the linking order of the libraries is
important. Fix linking llvm and clang libraries by changing the link
order: clang libs first, llvm libraries second.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@iki.fi>
At least on linux with gcc the linking order of the libraries is
important. Fix linking llvm libraries by changing the link order.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@iki.fi>
At least on linux with gcc the linking order of the libraries is
important. Fix linking clang libraries by changing the link order.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@iki.fi>
Now that the warnings have been fixed, we no longer need -fpermissive to
compile CppParser with gcc.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@iki.fi>
* Use clangIndex to identify declarations across translation units.
* Added new Find*ByUSR methods and removed unused Find*(IntPtr) methods.
* Added Depth/Index and IsParameterPack fields to TemplateParameterType.
* Fixed member initialization issues in C++ Method class.
* Added AST tests for function and class templates.
* All tests pass with new and old parser.
This library exists only in recent llvm, so adding it to link, breaks windows builds...
Premake do not allow this, so implement StaticLinksOpt in Helpers.lua