ferdymercury wrote: Just so that you can reproduce the behavior I am mentioning (eg on Ubuntu26), create a CMakeLists.txt in the main directory of llvm-project at branch release/22.x:
``` cmake_minimum_required(VERSION 3.20) project(ClangROOT) set(CLANG_BUILT_STANDALONE 1) find_package(LLVM 22.1) # searchs for system package at a specific version (there might be multiple installed in Ubuntu26), which sets DYLIB to ON set(LLVM_LINK_LLVM_DYLIB OFF) # override DYLIB to OFF, we need static add_subdirectory(clang) # this will call find_package LLVM again ``` and then ``` mkdir build && cd build cmake -DLLVM_INCLUDE_TESTS=OFF .. grep -r LLVM.so * ``` you will get `/usr/lib/llvm-22/lib/libLLVM.so` everywhere. After this patch: the .so will be gone when grepping. and `LLVM_LINK_LLVM_DYLIB` won't be overriden by the subdirectory. https://github.com/llvm/llvm-project/pull/218965 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
