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

Anton Korobeynikov anton at korobeynikov.info
Wed Feb 1 01:13:27 PST 2012


Hi Eli,

> Re-sending the patch itself (by request on IRC)
I thought about this patch a little bit more. And I think we should
have something "symmetric" wrt other targets/environments.

How do you feel about the following: we should have "sane" set of
defaults (macho on darwin, coff on win, elf everywhere else). If one
will explicitly ask for other format, it should be tolerated,
regardless whether elf was asked on windows or macho. What do you
think? I believe this will make the patch cleaner... I don't like
special case of ELF everywhere, such cases tend to be forgotten in
many places.

Minor nitpicks:

-    return !isTargetDarwin() && !isTargetWindows() && !isTargetCygMing();
+      return TargetTriple.getEnvironment() == Triple::ELF || (
+          !isTargetDarwin() && !isTargetWindows() && !isTargetCygMing());
Put ( at the new line :)

-- 
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University



More information about the llvm-commits mailing list