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 ce0e7ca
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
Expand Up @@ -5,6 +5,7 @@
#include <kllvm/codegen/Decision.h>
#include <kllvm/codegen/DecisionParser.h>
#include <kllvm/codegen/EmitConfigParser.h>
#include "kllvm/codegen/GCStrategy.h"
#include <kllvm/codegen/Metadata.h>
#include <kllvm/codegen/Options.h>
#include <kllvm/parser/KOREParser.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 ce0e7ca

Please sign in to comment.