[PATCH] D28791: [compiler-rt][crt] Simple crtbegin and crtend implementation
Loïc Yhuel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 1 06:19:17 PST 2017
loic.yhuel added inline comments.
================
Comment at: lib/crt/CMakeLists.txt:9
+ ${ARGN})
+ add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${name}.o
----------------
Perhaps we should have a "foreach (arch ${CRT_SUPPORTED_ARCH})" loop, and use ${TARGET_${arch}_CFLAGS}.
It would allow to add x86/arm/armhf.
================
Comment at: lib/crt/CMakeLists.txt:11
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${name}.o
+ COMMAND ${CMAKE_C_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR}/${CRT_SOURCE} ${CMAKE_C_CFLAGS} ${CRT_CFLAGS} -c -o ${COMPILER_RT_LIBRARY_OUTPUT_DIR}/${name}.o
+ DEPENDS ${CRT_SOURCE}
----------------
It's ${CMAKE_C_FLAGS}.
We probably should use something like :
```
string(TOUPPER ${CMAKE_BUILD_TYPE} CONFIG)
set(CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${CONFIG}}")
separate_arguments(CFLAGS)
```
Repository:
rL LLVM
https://reviews.llvm.org/D28791
More information about the llvm-commits
mailing list