Index: lib/builtins/CMakeLists.txt =================================================================== --- lib/builtins/CMakeLists.txt +++ lib/builtins/CMakeLists.txt @@ -335,12 +335,14 @@ endif () endforeach () - add_compiler_rt_runtime(clang_rt.builtins - STATIC - ARCHS ${arch} - SOURCES ${${arch}_SOURCES} - CFLAGS "-std=c99" - PARENT_TARGET builtins) + foreach (build_type STATIC SHARED) + add_compiler_rt_runtime(clang_rt.builtins + ${build_type} + ARCHS ${arch} + SOURCES ${${arch}_SOURCES} + CFLAGS "-std=c99" + PARENT_TARGET builtins) + endforeach() endif () endforeach () endif ()