Commit 1ea1e7ac authored by John Criswell's avatar John Criswell
Browse files

Merge in hack from Chris that discards libg.

llvm-svn: 24166
parent 398d2e2c
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -423,7 +423,10 @@ int llvm::GenerateNative(const std::string &OutputFilename,

  // Add in the libraries to link.
  for (unsigned index = 0; index < Libraries.size(); index++)
    if (Libraries[index] != "crtend") {
    // HACK: If this is libg, discard it.  This gets added by the compiler
    // driver when doing: 'llvm-gcc main.c -Wl,-native -o a.out -g'. Note that
    // this should really be fixed by changing the llvm-gcc compiler driver.
    if (Libraries[index] != "crtend" && Libraries[index] != "g") {
      std::string Tmp = "-l"+Libraries[index];
      StringsToDelete.push_back(strdup(Tmp.c_str()));
      args.push_back(StringsToDelete.back());