[lld] r220117 - Hardcode the list of ELF targets here rather than using a glob.

Richard Smith richard-llvm at metafoo.co.uk
Fri Oct 17 17:56:31 PDT 2014


Author: rsmith
Date: Fri Oct 17 19:56:31 2014
New Revision: 220117

URL: http://llvm.org/viewvc/llvm-project?rev=220117&view=rev
Log:
Hardcode the list of ELF targets here rather than using a glob.

The code was making non-portable assumptions about the exact string returned by
the glob (possibly by the shell?); this is more robust and matches what is done
everywhere else.

Modified:
    lld/trunk/lib/ReaderWriter/ELF/CMakeLists.txt

Modified: lld/trunk/lib/ReaderWriter/ELF/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/CMakeLists.txt?rev=220117&r1=220116&r2=220117&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/CMakeLists.txt (original)
+++ lld/trunk/lib/ReaderWriter/ELF/CMakeLists.txt Fri Oct 17 19:56:31 2014
@@ -18,11 +18,9 @@ target_link_libraries(lldELF ${cmake_2_8
 
 include_directories(.)
 
-file(GLOB all_valid_subdirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/CMakeLists.txt")
-
-foreach(dir ${all_valid_subdirs})
-    if(${dir} MATCHES "^([^/]*)//CMakeLists.txt")
-        string(REGEX REPLACE "^([^/]*)//CMakeLists.txt" "\\1" dir_trimmed ${dir})
-        add_subdirectory(${dir_trimmed})
-    endif()
-endforeach(dir)
+add_subdirectory(AArch64)
+add_subdirectory(Hexagon)
+add_subdirectory(Mips)
+add_subdirectory(PPC)
+add_subdirectory(X86)
+add_subdirectory(X86_64)





More information about the llvm-commits mailing list