[llvm-commits] CVS: llvm/tools/gccld/gccld.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sat Dec 11 23:54:06 PST 2004
Changes in directory llvm/tools/gccld:
gccld.cpp updated: 1.84 -> 1.85
---
Log message:
Do not internalize a module if -link-as-library is passed.
---
Diffs of the changes: (+9 -2)
Index: llvm/tools/gccld/gccld.cpp
diff -u llvm/tools/gccld/gccld.cpp:1.84 llvm/tools/gccld/gccld.cpp:1.85
--- llvm/tools/gccld/gccld.cpp:1.84 Tue Dec 7 23:17:40 2004
+++ llvm/tools/gccld/gccld.cpp Sun Dec 12 01:53:51 2004
@@ -212,9 +212,16 @@
// SIGINT signal.
sys::RemoveFileOnSignal(sys::Path(RealBytecodeOutput));
- // Generate the bytecode file.
+ // Strip everything if Strip is set, otherwise if stripdebug is set, just
+ // strip debug info.
int StripLevel = Strip ? 2 : (StripDebug ? 1 : 0);
- if (GenerateBytecode(Composite.get(), StripLevel, !NoInternalize, &Out)) {
+
+ // Internalize the module if neither -disable-internalize nor
+ // -link-as-library are passed in.
+ bool ShouldInternalize = !NoInternalize & !LinkAsLibrary;
+
+ // Generate the bytecode file.
+ if (GenerateBytecode(Composite.get(), StripLevel, ShouldInternalize, &Out)){
Out.close();
return PrintAndReturn(argv[0], "error generating bytecode");
}
More information about the llvm-commits
mailing list