forked from OSchip/llvm-project
Start using make() in COFF (with a smaller change.)
llvm-svn: 289089
This commit is contained in:
parent
2defe4d9a1
commit
7fed58cd9f
|
@ -15,6 +15,7 @@
|
|||
#include "Symbols.h"
|
||||
#include "Writer.h"
|
||||
#include "lld/Driver/Driver.h"
|
||||
#include "lld/Support/Memory.h"
|
||||
#include "llvm/ADT/Optional.h"
|
||||
#include "llvm/ADT/StringSwitch.h"
|
||||
#include "llvm/LibDriver/LibDriver.h"
|
||||
|
@ -43,10 +44,8 @@ Configuration *Config;
|
|||
LinkerDriver *Driver;
|
||||
|
||||
bool link(llvm::ArrayRef<const char *> Args) {
|
||||
Configuration C;
|
||||
LinkerDriver D;
|
||||
Config = &C;
|
||||
Driver = &D;
|
||||
Config = make<Configuration>();
|
||||
Driver = make<LinkerDriver>();
|
||||
Driver->link(Args);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -14,6 +14,10 @@
|
|||
#include "llvm/Support/Process.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
|
||||
#if !defined(_MSC_VER) && !defined(__MINGW32__)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
namespace lld {
|
||||
|
@ -27,9 +31,11 @@ void fatal(const Twine &Msg) {
|
|||
} else {
|
||||
errs() << "error: ";
|
||||
}
|
||||
|
||||
errs() << Msg << "\n";
|
||||
exit(1);
|
||||
|
||||
outs().flush();
|
||||
errs().flush();
|
||||
_exit(1);
|
||||
}
|
||||
|
||||
void fatal(std::error_code EC, const Twine &Msg) {
|
||||
|
|
Loading…
Reference in New Issue