Lines Matching defs:libname

44       set(libname "${name}.${os}")
45 set(libnames ${libnames} ${libname})
46 set(extra_cflags_${libname} ${DARWIN_${os}_CFLAGS})
47 list_intersect(LIB_ARCHS_${libname} DARWIN_${os}_ARCHS LIB_ARCHS)
51 set(libname "${name}.${arch}")
52 set(libnames ${libnames} ${libname})
53 set(extra_cflags_${libname} ${TARGET_${arch}_CFLAGS})
68 foreach(libname ${libnames})
69 add_library(${libname} OBJECT ${LIB_SOURCES})
71 add_dependencies(${libname} ${LIB_DEPS})
76 if(APPLE AND NOT "${libname}" MATCHES ".*\.osx.*")
83 "${libname}" MATCHES ".*\.osx.*")
84 foreach(arch ${LIB_ARCHS_${libname}})
90 set_target_compile_flags(${libname}
91 ${extra_cflags_${libname}} ${target_flags})
92 set_property(TARGET ${libname} APPEND PROPERTY
94 set_target_properties(${libname} PROPERTIES FOLDER "Compiler-RT/Libraries")
96 set_target_properties(${libname} PROPERTIES
97 OSX_ARCHITECTURES "${LIB_ARCHS_${libname}}")
223 set(libname "${name}_${os}")
225 set(libname "${name}_${os}_dynamic")
226 set(extra_link_flags_${libname} ${DARWIN_${os}_LINK_FLAGS} ${LIB_LINK_FLAGS})
228 list_intersect(LIB_ARCHS_${libname} DARWIN_${os}_ARCHS LIB_ARCHS)
229 if(LIB_ARCHS_${libname})
230 list(APPEND libnames ${libname})
231 set(extra_cflags_${libname} ${DARWIN_${os}_CFLAGS} ${NO_LTO_FLAGS} ${NO_PGO_FLAGS} ${LIB_CFLAGS})
232 set(output_name_${libname} ${libname}${COMPILER_RT_OS_SUFFIX})
233 set(sources_${libname} ${LIB_SOURCES})
234 format_object_libs(sources_${libname} ${os} ${LIB_OBJECT_LIBS})
235 get_compiler_rt_output_dir(${COMPILER_RT_DEFAULT_TARGET_ARCH} output_dir_${libname})
236 get_compiler_rt_install_dir(${COMPILER_RT_DEFAULT_TARGET_ARCH} install_dir_${libname})
242 foreach(arch ${LIB_ARCHS_${libname}})
243 list(APPEND extra_cflags_${libname}
245 list(APPEND extra_link_flags_${libname}
257 set(libname "${name}-${arch}")
258 set_output_name(output_name_${libname} ${name}${COMPILER_RT_OS_SUFFIX} ${arch})
260 set(libname "${name}-${arch}")
261 set_output_name(output_name_${libname} ${name} ${arch})
263 set(libname "${name}-dynamic-${arch}")
264 set(extra_cflags_${libname} ${TARGET_${arch}_CFLAGS} ${LIB_CFLAGS})
265 set(extra_link_flags_${libname} ${TARGET_${arch}_LINK_FLAGS} ${LIB_LINK_FLAGS})
267 set_output_name(output_name_${libname} ${name}_dynamic ${arch})
269 set_output_name(output_name_${libname} ${name} ${arch})
275 find_compiler_rt_library(builtins builtins_${libname} TARGET ${target})
276 if(builtins_${libname} STREQUAL "NOTFOUND")
280 set(sources_${libname} ${LIB_SOURCES})
281 format_object_libs(sources_${libname} ${arch} ${LIB_OBJECT_LIBS})
282 set(libnames ${libnames} ${libname})
283 set(extra_cflags_${libname} ${TARGET_${arch}_CFLAGS} ${NO_LTO_FLAGS} ${NO_PGO_FLAGS} ${LIB_CFLAGS})
284 get_compiler_rt_output_dir(${arch} output_dir_${libname})
285 get_compiler_rt_install_dir(${arch} install_dir_${libname})
302 foreach(libname ${libnames})
308 set(COMPONENT_OPTION COMPONENT ${libname})
317 list(APPEND extra_cflags_${libname} "--target=${CMAKE_C_COMPILER_TARGET}")
320 list(APPEND extra_cflags_${libname} "--sysroot=${CMAKE_SYSROOT}")
322 string(REPLACE ";" " " extra_cflags_${libname} "${extra_cflags_${libname}}")
325 set(compile_command_${libname} "${CMAKE_C_COMPILE_OBJECT}")
327 set(output_file_${libname} ${output_name_${libname}}${CMAKE_C_OUTPUT_EXTENSION})
331 compile_command_${libname} ${compile_command_${libname}})
333 string(REPLACE "<OBJECT>" "${output_dir_${libname}}/${output_file_${libname}}"
334 compile_command_${libname} ${compile_command_${libname}})
336 string(REPLACE "<SOURCE>" "${sources_${libname}}"
337 compile_command_${libname} ${compile_command_${libname}})
339 string(REPLACE "<FLAGS>" "${CMAKE_C_FLAGS} ${extra_cflags_${libname}}"
340 compile_command_${libname} ${compile_command_${libname}})
342 string(REPLACE "${substitution}" "" compile_command_${libname}
343 ${compile_command_${libname}})
346 separate_arguments(compile_command_${libname})
348 OUTPUT ${output_dir_${libname}}/${output_file_${libname}}
349 COMMAND ${compile_command_${libname}}
350 DEPENDS ${sources_${libname}}
351 COMMENT "Building C object ${output_file_${libname}}")
352 add_custom_target(${libname} DEPENDS ${output_dir_${libname}}/${output_file_${libname}})
353 set_target_properties(${libname} PROPERTIES FOLDER "Compiler-RT/Codegenning")
354 install(FILES ${output_dir_${libname}}/${output_file_${libname}}
355 DESTINATION ${install_dir_${libname}}
358 add_library(${libname} ${type} ${sources_${libname}})
359 set_target_compile_flags(${libname} ${extra_cflags_${libname}})
360 set_target_link_flags(${libname} ${extra_link_flags_${libname}})
361 set_property(TARGET ${libname} APPEND PROPERTY
363 set_target_output_directories(${libname} ${output_dir_${libname}})
364 install(TARGETS ${libname}
365 ARCHIVE DESTINATION ${install_dir_${libname}}
367 LIBRARY DESTINATION ${install_dir_${libname}}
369 RUNTIME DESTINATION ${install_dir_${libname}}
373 add_dependencies(${libname} ${LIB_DEPS})
375 set_target_properties(${libname} PROPERTIES
376 OUTPUT_NAME ${output_name_${libname}}
379 target_link_libraries(${libname} PRIVATE ${LIB_LINK_LIBS})
381 if(builtins_${libname})
382 target_link_libraries(${libname} PRIVATE ${builtins_${libname}})
386 set_property(TARGET ${libname} PROPERTY BUILD_WITH_INSTALL_RPATH ON)
389 set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "")
390 set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib")
417 add_custom_command(TARGET ${libname}
419 COMMAND ${CODESIGN} --sign - ${EXTRA_CODESIGN_ARGUMENTS} $<TARGET_FILE:${libname}>
430 add_compiler_rt_install_targets(${libname} ${parent_target_arg})
433 set_target_properties(${libname} PROPERTIES
434 OSX_ARCHITECTURES "${LIB_ARCHS_${libname}}")
438 rt_externalize_debuginfo(${libname})
442 set_target_properties(${libname} PROPERTIES C_EXTENSIONS ${LIB_EXTENSIONS})