Environment.cpp revision 22add6ff3426df1a85089fe6a6e1597ee3b6f300
1//===- Environment.cpp ----------------------------------------------------===//
2//
3//                     The MCLinker Project
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9#include <mcld/Environment.h>
10#include <mcld/Support/TargetSelect.h>
11
12void mcld::Initialize()
13{
14  static bool is_initialized = false;
15
16  if (is_initialized)
17    return;
18
19  mcld::InitializeAllTargets();
20  mcld::InitializeAllEmulations();
21  mcld::InitializeAllDiagnostics();
22
23  is_initialized = true;
24}
25
26void mcld::Finalize()
27{
28}
29
30