summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2016-02-24 20:46:36 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2016-02-24 20:46:36 +0000
commit209acc3e3dae1499aca767441406403f77ccc8ee (patch)
treedde54b3893a2e9ec071433c4bd5d4f5cdcfbb62e /runtime
parent1d71b291bc87fc8137bd8c976bba2753e2de45ee (diff)
Add whole-program vtable optimization feature to Clang.
This patch introduces the -fwhole-program-vtables flag, which enables the whole-program vtable optimization feature (D16795) in Clang. Differential Revision: http://reviews.llvm.org/D16821 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261767 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'runtime')
-rw-r--r--runtime/CMakeLists.txt10
-rw-r--r--runtime/vtables_blacklist.txt8
2 files changed, 18 insertions, 0 deletions
diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt
index 4775b0d25d..3215d8f628 100644
--- a/runtime/CMakeLists.txt
+++ b/runtime/CMakeLists.txt
@@ -134,3 +134,13 @@ if(LLVM_BUILD_EXTERNAL_COMPILER_RT AND EXISTS ${COMPILER_RT_SRC_ROOT}/)
VERBATIM)
endif()
endif()
+
+set(src "${CMAKE_CURRENT_SOURCE_DIR}/vtables_blacklist.txt")
+set(dst "${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}/vtables_blacklist.txt")
+add_custom_command(OUTPUT ${dst}
+ DEPENDS ${src}
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
+ COMMENT "Copying vtables blacklist")
+add_custom_target(vtables_blacklist DEPENDS ${dst})
+add_dependencies(clang vtables_blacklist)
+install(FILES ${src} DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION})
diff --git a/runtime/vtables_blacklist.txt b/runtime/vtables_blacklist.txt
new file mode 100644
index 0000000000..f2016428d8
--- /dev/null
+++ b/runtime/vtables_blacklist.txt
@@ -0,0 +1,8 @@
+# Standard library types.
+type:std::*
+
+# The stdext namespace contains Microsoft standard library extensions.
+type:stdext::*
+
+# Types with a uuid attribute, i.e. COM types.
+type:attr:uuid