[PATCH] [cmake] Unbreak LLVM-Config.cmake / llvm_expand_dependencies
Reid Kleckner
rnk at google.com
Mon Dec 1 12:38:23 PST 2014
================
Comment at: cmake/modules/LLVM-Config.cmake:155
@@ -154,1 +154,3 @@
+function(expand_topologically name required_libs visited_libs)
+ list(FIND visited_libs ${name} found)
----------------
Can you add a comment before the function describing what it does, and perhaps reference the llvm-config code? It's doing a post-order traversal, which is apparently not what the linker expects.
Would a pre-order traversal save the list reversal? It's not immediately clear to me that it would.
================
Comment at: cmake/modules/LLVM-Config.cmake:183
@@ +182,3 @@
+
+ list(REVERSE required_libs)
+ set(${out_libs} ${required_libs} PARENT_SCOPE)
----------------
I guess the linker actually expects roots first and leaves last.
http://reviews.llvm.org/D6099
More information about the llvm-commits
mailing list