From a076360ca1a41dea1add040971c34e17a44c050a Mon Sep 17 00:00:00 2001 From: Maria Kotsifakou Date: Fri, 6 Dec 2024 13:13:17 -0600 Subject: [PATCH] Construct an instance of the GC strategy in main of llvm-kompile-codegen to ensure linking. --- tools/llvm-kompile-codegen/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/llvm-kompile-codegen/main.cpp b/tools/llvm-kompile-codegen/main.cpp index 9cc5c5b0c..db88ce955 100644 --- a/tools/llvm-kompile-codegen/main.cpp +++ b/tools/llvm-kompile-codegen/main.cpp @@ -1,3 +1,4 @@ +#include "kllvm/codegen/GCStrategy.h" #include #include #include @@ -147,6 +148,7 @@ void emit_metadata(llvm::Module &mod) { // NOLINTNEXTLINE(*-cognitive-complexity) int main(int argc, char **argv) { + LLVMBackendGCStrategy _gcs; // Unused. This is needed to ensure linking. initialize_llvm(); cl::HideUnrelatedOptions({&codegen_tool_cat, &codegen_lib_cat});