github.com/aykevl/tinygo@v0.5.0/lld.cpp (about)

     1  // +build byollvm
     2  
     3  // This file provides C wrappers for liblld.
     4  
     5  #include <lld/Common/Driver.h>
     6  
     7  extern "C" {
     8  
     9  bool tinygo_link_elf(int argc, char **argv) {
    10  	std::vector<const char*> args(argv, argv + argc);
    11  	return lld::elf::link(args, false);
    12  }
    13  
    14  bool tinygo_link_wasm(int argc, char **argv) {
    15  	std::vector<const char*> args(argv, argv + argc);
    16  	return lld::wasm::link(args, false);
    17  }
    18  
    19  } // external "C"