Skip to content

Commit

Permalink
Construct an instance of the GC strategy in main of llvm-kompile-code…
Browse files Browse the repository at this point in the history
…gen to ensure linking.
  • Loading branch information
mariaKt committed Dec 6, 2024
1 parent f31d45a commit a076360
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/llvm-kompile-codegen/main.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "kllvm/codegen/GCStrategy.h"
#include <kllvm/ast/AST.h>
#include <kllvm/codegen/ApplyPasses.h>
#include <kllvm/codegen/CreateTerm.h>
Expand Down Expand Up @@ -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});
Expand Down

0 comments on commit a076360

Please sign in to comment.