#define LLVM_INLINEASM_H
#include "llvm/Value.h"
+#include "llvm/Support/IncludeFile.h"
#include <vector>
namespace llvm {
InlineAsm(const FunctionType *Ty, const std::string &AsmString,
const std::string &Constraints, bool hasSideEffects);
- ~InlineAsm();
+ virtual ~InlineAsm();
public:
/// InlineAsm::get - Return the the specified uniqued inline asm string.
} // End llvm namespace
+// Make sure the InlineAsm.cpp file is linked when this one is #included.
+FORCE_DEFINING_FILE_TO_BE_LINKED(InlineAsm)
+
#endif
#define LLVM_LINKALLVMCORE_H
#include "llvm/Support/IncludeFile.h"
+#include "llvm/Support/Mangler.h"
#include "llvm/Module.h"
#include "llvm/Instructions.h"
#include "llvm/IntrinsicInst.h"
+#include "llvm/InlineAsm.h"
#include "llvm/Analysis/Verifier.h"
namespace {
//
//===----------------------------------------------------------------------===//
+#include "llvm/LinkAllVMCore.h"
#include "llvm/Linker.h"
#include "llvm/System/Program.h"
#include "llvm/Module.h"
cl::desc("Disable writing of compressed bytecode files"));
static cl::list<std::string> PostLinkOpts("post-link-opts",
- cl::value_desc("path to post-link optimization programs"),
+ cl::value_desc("path"),
cl::desc("Run one or more optimization programs after linking"));
+static cl::list<std::string> XLinker("Xlinker", cl::value_desc("option"),
+ cl::desc("Pass options to the system linker"));
+
// Compatibility options that are ignored but supported by LD
static cl::opt<std::string> CO3("soname", cl::Hidden,
cl::desc("Compatibility option: ignored"));
static cl::opt<std::string> CO6("h", cl::Hidden,
cl::desc("Compatibility option: ignored"));
+
/// This is just for convenience so it doesn't have to be passed around
/// everywhere.
static std::string progname;
args.push_back(OutputFilename.c_str());
args.push_back(InputFilename.c_str());
+ // Add in the library paths
+ for (unsigned index = 0; index < LibPaths.size(); index++) {
+ args.push_back("-L");
+ args.push_back(LibPaths[index].c_str());
+ }
+
+ // Add the requested options
+ for (unsigned index = 0; index < XLinker.size(); index++) {
+ args.push_back(XLinker[index].c_str());
+ args.push_back(Libraries[index].c_str());
+ }
+
// Add in the libraries to link.
for (unsigned index = 0; index < Libraries.size(); index++)
if (Libraries[index] != "crtend") {
args.push_back("-l");
args.push_back(Libraries[index].c_str());
}
+
args.push_back(0);
// Run the compiler to assembly and link together the program.