[PATCH] D13226: [CMake] [Darwin] Support building the macho_embedded builtin libraries.

Alexey Samsonov via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 29 15:31:00 PDT 2015


samsonov added inline comments.

================
Comment at: cmake/Modules/CompilerRTDarwinUtils.cmake:306
@@ +305,3 @@
+
+  set(CMAKE_C_FLAGS "-Wall -fomit-frame-pointer -ffreestanding")
+  set(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS})
----------------
Please make sure these changes will not leak out of this macro and affect further compilations.

================
Comment at: cmake/Modules/CompilerRTDarwinUtils.cmake:361
@@ +360,3 @@
+                    DEPENDS ${macho_embedded_${lib_suffix}_libs}
+                    OUTPUT_DIR ${COMPILER_RT_LIBRARY_OUTPUT_DIR}/../macho_embedded/)
+    endforeach()
----------------
Ugh. It's better to provide a different global variable for macho_embedded libraries, relative to COMPILER_RT_OUTPUT_DIR.

================
Comment at: cmake/config-ix.cmake:395
@@ -394,1 +394,3 @@
 
+  set(DARWIN_macho_embedded_ARCHS armv6m armv7m armv7em armv7 i386 x86_64)
+  set(DARWIN_macho_embedded_SYSROOT ${DARWIN_osx_SYSROOT})
----------------
Just move these declarations to `darwin_add_embedded_builtin_libraries`: you already hardcode a lot of archs/flags etc. there.


http://reviews.llvm.org/D13226





More information about the llvm-commits mailing list