[llvm-commits] [PATCH] [lld] Move everything over to TargetInfo.
kledzik at apple.com
kledzik at apple.com
Tue Jan 22 14:56:38 PST 2013
mach-o has 8 different file kinds. Your generic LinkerOptions::OutputKind only has three kinds. Either we need to make the generic a superset of all kinds for all formats, or mach-o should maintain its own OutputKind and your changes to switch mach-o to use the generic should be undone.
Other than these comments, LGTM.
================
Comment at: lib/ReaderWriter/MachO/WriterMachO.cpp:800-805
@@ -798,8 +799,8 @@
// Add entry point load command to main executables
- if ( _options.addEntryPointLoadCommand() ) {
+ if (_targetInfo.getLinkerOptions()._outputKind == OutputKind::Executable) {
_entryPointLoadCommand = new entry_point_command(is64);
this->addLoadCommand(_entryPointLoadCommand);
- }
- else if ( _options.addUnixThreadLoadCommand() ) {
- _threadLoadCommand = new thread_command(_options.cpuType(), is64);
+ } else if (_targetInfo.getLinkerOptions()._outputKind ==
+ OutputKind::Executable) {
+ _threadLoadCommand = new thread_command(_targetInfo.getCPUType(), is64);
this->addLoadCommand(_threadLoadCommand);
----------------
These if conditions are now incorrect.
================
Comment at: lib/ReaderWriter/MachO/WriterMachO.cpp:654
@@ +653,3 @@
+ return MH_DYLIB;
+ case OutputKind::Relocatable:
+ return MH_OBJECT;
----------------
You dropped the "bundle" case
http://llvm-reviews.chandlerc.com/D321
More information about the llvm-commits
mailing list