Open tenko opened 4 months ago
~The llvm_map_components_to_libnames
function seems to be deprecated.~ The changes in src/CMakeLists.txt
can be made more robust like this:
- llvm_map_components_to_libnames(llvm_libs core executionengine jitlink orcjit nativecodegen support passes ${LLVM_TARGETS_TO_BUILD})
+ execute_process(COMMAND llvm-config --libs core executionengine jitlink orcjit nativecodegen support passes ${LLVM_TARGETS_TO_BUILD} OUTPUT_VARIABLE llvm_libs)
+ string(STRIP ${llvm_libs} llvm_libs)
This should work™ on all systems. However, I have only tested it on Archlinux.
The
llvm_map_components_to_libnames
function seems to be deprecated.
Citation needed!
Otherwise, this looks like a platform independent solution! Thanks, @JohannBo!
Output summary from
make test
:Failed Tests (4): Oberon :: codegen/arithmetic_12.mod Oberon :: codegen/array_5.mod Oberon :: codegen/case_1.mod Oberon :: codegen/loop_2.mod Unexpectedly Passed Tests (7): Oberon :: codegen/arithmetic_11.mod Oberon :: codegen/arithmetic_15.mod Oberon :: codegen/arithmetic_3.mod Oberon :: codegen/arithmetic_5.mod Oberon :: codegen/arithmetic_6.mod Oberon :: codegen/arithmetic_9.mod Oberon :: codegen/procedure_4.mod Total Discovered Tests: 92 Unsupported : 2 (2.17%) Passed : 70 (76.09%) Expectedly Failed : 9 (9.78%) Failed : 4 (4.35%) Unexpectedly Passed: 7 (7.61%)
Just to confirm: this is the expected (current) outcome of the unit tests on an x86_64 platform.
Successfully built on latest ArchLinux distribution.
Version:
Small fixes performed on
src/global.h
due to missing include:Small fixes performed on
src/data/ast/ASTContext.h
due to missing include:Small fixes performed on
src/CMakeLists.txt
due to different LLVM library structure:On ArchLinux LLVM is build to a single dynamic library
LLVM-17.so
. Not sure how to reliable detect this.Small fix performed on
liboberon/Makefile
to proceed with the build:These changes are probably generic and could be added to the main repository.
Output summary from
make test
: