UNDER THE HOOD
Build structure
- The top-level
CMakeLists.txtbuildslib/(Core, Frontend),tools/,runtime/and, withWEAVEC_BUILD_TESTS,unittests/andtest/. cmake/WeaveCLLVM.cmakefinds LLVM and Clang and provides theweavec::llvminterface target andweavec_link_llvm/weavec_link_clang, which respectLLVM_LINK_LLVM_DYLIBandCLANG_LINK_CLANG_DYLIB.cmake/WeaveCHelpers.cmakeprovidesweavec_add_libraryandweavec_add_executable. OnlyUSES_LLVMtargets get LLVM’s include paths, and Core is not one of them.lib/Core/CMakeLists.txtembedsLibrarySpec.txtas a byte array at configure time; editing the table re-runs the configure step.runtime/CMakeLists.txtbuildslibweavec_rt.aandlibweavec_alloc.ainto the build tree’slib/weavec, position-independent, never as LTO bitcode, and always with-O2and without the allocation builtins, whatever the build type. WithWEAVEC_BUILD_TESTSit also buildsweavec_rt_test, whichtest/CMakeLists.txtregisters as the CTestruntime.- A CMake package config (
find_package(WeaveC)) exportsweavec::Coreandweavec::Frontendto external tools.