[PATCH] Add an LTO interface to parse metadata and extract linker options
Nick Kledzik
kledzik at apple.com
Wed Jan 15 18:26:42 PST 2014
On Jan 15, 2014, at 2:48 PM, Sean Silva wrote:
> On Wed, Jan 15, 2014 at 4:12 PM, kledzik at apple.com <kledzik at apple.com> wrote:
>
>
> ================
> Comment at: include/llvm-c/lto.h:201
> @@ -201,2 +201,2 @@
>
>
> ----------------
> When you add new APIs to <llvm-c/lto.h> be sure to bump up LTO_API_VERSION, so that clients to do compile time configuration checks if the API exists.
>
> We don't seem to document when features were introduced, so I don't see the point in this (do we expect clients to go searching through our version control history?). In practice, ./configure scripts and CMake use "does this function exist" checks to directly test the existence of the function (maybe you were talking about doing this purely inside an #ifdef in the source code?).
Yes. ld64 has lots of:
#If LTO_API_VERSION > 5
// use new lot api
#endif
in its source code to enable it to build with lots of different versions of libLTO.dylib
-Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140115/e9baca86/attachment.html>
More information about the llvm-commits
mailing list