[llvm-commits] FW: [PATCH] enabling generation of ELF objects on Windows with the help of the triple

Bendersky, Eli eli.bendersky at intel.com
Wed Feb 1 04:22:26 PST 2012


> > Anton, I think I see what you mean. The parallel thread with Eric discusses
> larger, conceptual differences which may end in all this code being changed
> to something completely different. However, if this approach is eventually
> accepted, I will try to streamline the special-casing for ELF to be more logical
> and similar to the special-casing for MachO, as you say.
> Well, I think the root issue is precisely the same as Eric says. And eventually
> you will end to some sort of refactoring which will streamline the stuff. Surely
> adding "yet another special case" is a wrong conceptual solution :)
> 

If (the part which I call "conceptual"), ELF stays alongside existing MachO in the Environment enum, the "streamlining" I'm referring to is to restructure code that tries to figure out the container to generate, so that it looks like this (pseudo-code):

if environment is MachO:
  create MachO
elif environment is ELF:
  create ELF
else
  decide based on the OS part of the Triple (Windows -> COFF, Mac -> MachO), etc.


Eli

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.




More information about the llvm-commits mailing list