summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRahul Kumar <rahku@microsoft.com>2015-02-08 22:04:06 -0800
committerRahul Kumar <rahku@microsoft.com>2015-02-08 22:04:06 -0800
commite092ea19d2fba739f4b1efa5ab204b6ee724c7f8 (patch)
treed7343438c0d52963df401230b3f5c7bf68ad3e08 /src
parent4cca1a4b23d0dd7c18c30eff378cea759a8f1a9e (diff)
downloadcoreclr-e092ea19d2fba739f4b1efa5ab204b6ee724c7f8.tar.gz
coreclr-e092ea19d2fba739f4b1efa5ab204b6ee724c7f8.tar.bz2
coreclr-e092ea19d2fba739f4b1efa5ab204b6ee724c7f8.zip
precompile common headers to reduce build time for win builds. With this build time on my machine has reduced from 19mins to 10mins.
[tfs-changeset: 1412352]
Diffstat (limited to 'src')
-rw-r--r--src/debug/daccess/CMakeLists.txt2
-rw-r--r--src/debug/di/CMakeLists.txt2
-rw-r--r--src/debug/ee/dac/CMakeLists.txt2
-rw-r--r--src/debug/ee/wks/CMakeLists.txt2
-rw-r--r--src/dlls/mscordbi/CMakeLists.txt2
-rw-r--r--src/ipcman/ipcman-staticcrt/CMakeLists.txt1
-rw-r--r--src/jit/CMakeLists.txt3
-rw-r--r--src/md/ceefilegen/CMakeLists.txt2
-rw-r--r--src/md/compiler/dac/CMakeLists.txt1
-rw-r--r--src/md/compiler/dbi/CMakeLists.txt2
-rw-r--r--src/md/compiler/wks/CMakeLists.txt2
-rw-r--r--src/md/datasource/dbi/CMakeLists.txt2
-rw-r--r--src/md/enc/dac/CMakeLists.txt1
-rw-r--r--src/md/enc/dbi/CMakeLists.txt2
-rw-r--r--src/md/enc/wks/CMakeLists.txt2
-rw-r--r--src/md/hotdata/dac/CMakeLists.txt2
-rw-r--r--src/md/hotdata/full-staticcrt/CMakeLists.txt2
-rw-r--r--src/md/hotdata/full/CMakeLists.txt2
-rw-r--r--src/md/runtime/dac/CMakeLists.txt2
-rw-r--r--src/md/runtime/dbi/CMakeLists.txt1
-rw-r--r--src/md/runtime/wks/CMakeLists.txt2
-rw-r--r--src/md/winmd/dac/CMakeLists.txt1
-rw-r--r--src/md/winmd/dbi/CMakeLists.txt2
-rw-r--r--src/md/winmd/wks/CMakeLists.txt2
-rw-r--r--src/utilcode/cycletimer.cpp1
-rw-r--r--src/utilcode/dac/CMakeLists.txt4
-rw-r--r--src/utilcode/dyncrt/CMakeLists.txt1
-rw-r--r--src/utilcode/lazycow.cpp2
-rw-r--r--src/utilcode/staticnohost/CMakeLists.txt2
-rw-r--r--src/vm/dac/CMakeLists.txt1
-rw-r--r--src/vm/wks/CMakeLists.txt9
31 files changed, 60 insertions, 4 deletions
diff --git a/src/debug/daccess/CMakeLists.txt b/src/debug/daccess/CMakeLists.txt
index cdea53390c..9851dc8088 100644
--- a/src/debug/daccess/CMakeLists.txt
+++ b/src/debug/daccess/CMakeLists.txt
@@ -47,4 +47,6 @@ endif(IS_64BIT_BUILD EQUAL 1)
convert_to_absolute_path(DACCESS_SOURCES ${DACCESS_SOURCES})
+add_precompiled_header(stdafx.h stdafx.cpp DACCESS_SOURCES)
+
add_library(daccess ${DACCESS_SOURCES})
diff --git a/src/debug/di/CMakeLists.txt b/src/debug/di/CMakeLists.txt
index ab8c4da592..6546b69920 100644
--- a/src/debug/di/CMakeLists.txt
+++ b/src/debug/di/CMakeLists.txt
@@ -51,6 +51,6 @@ elseif(CLR_CMAKE_PLATFORM_UNIX)
endif(WIN32)
-
+add_precompiled_header(stdafx.h stdafx.cpp CORDBDI_SOURCES)
add_library(cordbdi STATIC ${CORDBDI_SOURCES}) \ No newline at end of file
diff --git a/src/debug/ee/dac/CMakeLists.txt b/src/debug/ee/dac/CMakeLists.txt
index 9a48058b83..c60a5f8a08 100644
--- a/src/debug/ee/dac/CMakeLists.txt
+++ b/src/debug/ee/dac/CMakeLists.txt
@@ -1,4 +1,6 @@
include(${CLR_DIR}/dac.cmake)
+add_precompiled_header(stdafx.h ../stdafx.cpp CORDBEE_SOURCES_DAC)
+
add_library(cordbee_dac ${CORDBEE_SOURCES_DAC})
diff --git a/src/debug/ee/wks/CMakeLists.txt b/src/debug/ee/wks/CMakeLists.txt
index 13c575d559..9438b00b53 100644
--- a/src/debug/ee/wks/CMakeLists.txt
+++ b/src/debug/ee/wks/CMakeLists.txt
@@ -1,6 +1,8 @@
if (WIN32)
+add_precompiled_header(stdafx.h ../stdafx.cpp CORDBEE_SOURCES_WKS)
+
if (IS_64BIT_BUILD EQUAL 1)
FIND_PROGRAM(ASM_COMPILER ml64.exe)
else ()
diff --git a/src/dlls/mscordbi/CMakeLists.txt b/src/dlls/mscordbi/CMakeLists.txt
index 627da37524..5d1cf42e50 100644
--- a/src/dlls/mscordbi/CMakeLists.txt
+++ b/src/dlls/mscordbi/CMakeLists.txt
@@ -3,6 +3,8 @@ set(MSCORDBI_SOURCES
)
if(WIN32)
+ add_precompiled_header(stdafx.h stdafx.cpp MSCORDBI_SOURCES)
+
add_definitions(-DFX_VER_INTERNALNAME_STR=mscordbi.dll)
list(APPEND MSCORDBI_SOURCES
diff --git a/src/ipcman/ipcman-staticcrt/CMakeLists.txt b/src/ipcman/ipcman-staticcrt/CMakeLists.txt
index 01c155c7ad..91590bb0bb 100644
--- a/src/ipcman/ipcman-staticcrt/CMakeLists.txt
+++ b/src/ipcman/ipcman-staticcrt/CMakeLists.txt
@@ -1,2 +1,3 @@
add_definitions(-D_CRTIMP=) #static link of crt
+add_precompiled_header(stdafx.h ../stdafx.cpp IPCMAN_SOURCES)
add_library(ipcmanager-staticcrt STATIC ${IPCMAN_SOURCES}) \ No newline at end of file
diff --git a/src/jit/CMakeLists.txt b/src/jit/CMakeLists.txt
index 59d66bd216..35dcf86181 100644
--- a/src/jit/CMakeLists.txt
+++ b/src/jit/CMakeLists.txt
@@ -65,6 +65,9 @@ set( SOURCES
)
if( WIN32 )
+
+ add_precompiled_header(jitpch.h jitpch.cpp SOURCES)
+
# Create .def file containing a list of exports preceeded by
# 'EXPORTS'. The file "ClrJit.exports" already contains the list, so we
# massage it into the correct format here to create "ClrJit.exports.def".
diff --git a/src/md/ceefilegen/CMakeLists.txt b/src/md/ceefilegen/CMakeLists.txt
index 2df7055400..146c6a02c3 100644
--- a/src/md/ceefilegen/CMakeLists.txt
+++ b/src/md/ceefilegen/CMakeLists.txt
@@ -15,6 +15,8 @@ if(CLR_CMAKE_PLATFORM_UNIX)
add_compile_options(-fPIC)
endif(CLR_CMAKE_PLATFORM_UNIX)
+add_precompiled_header(stdafx.h stdafx.cpp CEEFILEGEN_SOURCES)
+
add_library(ceefgen
STATIC
${CEEFILEGEN_SOURCES}
diff --git a/src/md/compiler/dac/CMakeLists.txt b/src/md/compiler/dac/CMakeLists.txt
index efc424b572..a73f7b0459 100644
--- a/src/md/compiler/dac/CMakeLists.txt
+++ b/src/md/compiler/dac/CMakeLists.txt
@@ -2,4 +2,5 @@
include(${CLR_DIR}/dac.cmake)
include(../../md_dac.cmake)
+add_precompiled_header(stdafx.h ../stdafx.cpp MDCOMPILER_SOURCES)
add_library(mdcompiler_dac ${MDCOMPILER_SOURCES})
diff --git a/src/md/compiler/dbi/CMakeLists.txt b/src/md/compiler/dbi/CMakeLists.txt
index 4244eec4e7..e60d67767b 100644
--- a/src/md/compiler/dbi/CMakeLists.txt
+++ b/src/md/compiler/dbi/CMakeLists.txt
@@ -1,2 +1,4 @@
include(../../md_dbi.cmake)
+
+add_precompiled_header(stdafx.h ../stdafx.cpp MDCOMPILER_SOURCES)
add_library(mdcompiler-dbi ${MDCOMPILER_SOURCES}) \ No newline at end of file
diff --git a/src/md/compiler/wks/CMakeLists.txt b/src/md/compiler/wks/CMakeLists.txt
index a004ed9df9..7eb09e7524 100644
--- a/src/md/compiler/wks/CMakeLists.txt
+++ b/src/md/compiler/wks/CMakeLists.txt
@@ -1,2 +1,4 @@
include(../../md_wks.cmake)
+
+add_precompiled_header(stdafx.h ../stdafx.cpp MDCOMPILER_SOURCES)
add_library(mdcompiler_wks ${MDCOMPILER_SOURCES}) \ No newline at end of file
diff --git a/src/md/datasource/dbi/CMakeLists.txt b/src/md/datasource/dbi/CMakeLists.txt
index 248335b8e9..c509c19410 100644
--- a/src/md/datasource/dbi/CMakeLists.txt
+++ b/src/md/datasource/dbi/CMakeLists.txt
@@ -1,2 +1,4 @@
include(../../md_dbi.cmake)
+
+add_precompiled_header(stdafx.h ../stdafx.cpp MDDATASOURCE_SOURCES)
add_library(mddatasource_dbi STATIC ${MDDATASOURCE_SOURCES}) \ No newline at end of file
diff --git a/src/md/enc/dac/CMakeLists.txt b/src/md/enc/dac/CMakeLists.txt
index b651fc28ac..90f7e786b6 100644
--- a/src/md/enc/dac/CMakeLists.txt
+++ b/src/md/enc/dac/CMakeLists.txt
@@ -2,4 +2,5 @@
include(${CLR_DIR}/dac.cmake)
include(../../md_dac.cmake)
+add_precompiled_header(stdafx.h ../stdafx.cpp MDRUNTIMERW_SOURCES)
add_library(mdruntimerw_dac ${MDRUNTIMERW_SOURCES})
diff --git a/src/md/enc/dbi/CMakeLists.txt b/src/md/enc/dbi/CMakeLists.txt
index 7898bfafdd..6cd97dd5bd 100644
--- a/src/md/enc/dbi/CMakeLists.txt
+++ b/src/md/enc/dbi/CMakeLists.txt
@@ -1,2 +1,4 @@
include(../../md_dbi.cmake)
+
+add_precompiled_header(stdafx.h ../stdafx.cpp MDRUNTIMERW_SOURCES)
add_library(mdruntimerw-dbi ${MDRUNTIMERW_SOURCES}) \ No newline at end of file
diff --git a/src/md/enc/wks/CMakeLists.txt b/src/md/enc/wks/CMakeLists.txt
index e31d8ec056..5b596ed7fa 100644
--- a/src/md/enc/wks/CMakeLists.txt
+++ b/src/md/enc/wks/CMakeLists.txt
@@ -1,2 +1,4 @@
include(../../md_wks.cmake)
+
+add_precompiled_header(stdafx.h ../stdafx.cpp MDRUNTIMERW_SOURCES)
add_library(mdruntimerw_wks ${MDRUNTIMERW_SOURCES})
diff --git a/src/md/hotdata/dac/CMakeLists.txt b/src/md/hotdata/dac/CMakeLists.txt
index 9f37472641..02519679d3 100644
--- a/src/md/hotdata/dac/CMakeLists.txt
+++ b/src/md/hotdata/dac/CMakeLists.txt
@@ -1,4 +1,6 @@
include(${CLR_DIR}/dac.cmake)
+add_precompiled_header(external.h ../external.cpp MDHOTDATA_SOURCES)
+
add_library(mdhotdata_dac ${MDHOTDATA_SOURCES})
diff --git a/src/md/hotdata/full-staticcrt/CMakeLists.txt b/src/md/hotdata/full-staticcrt/CMakeLists.txt
index dd7488f768..3d796a23c0 100644
--- a/src/md/hotdata/full-staticcrt/CMakeLists.txt
+++ b/src/md/hotdata/full-staticcrt/CMakeLists.txt
@@ -1,2 +1,4 @@
add_definitions(-D_CRTIMP=) # static link of crt
+
+add_precompiled_header(external.h ../external.cpp MDHOTDATA_SOURCES)
add_library(mdhotdata-staticcrt ${MDHOTDATA_SOURCES})
diff --git a/src/md/hotdata/full/CMakeLists.txt b/src/md/hotdata/full/CMakeLists.txt
index 688dfbee9a..15448b182a 100644
--- a/src/md/hotdata/full/CMakeLists.txt
+++ b/src/md/hotdata/full/CMakeLists.txt
@@ -1 +1,3 @@
+add_precompiled_header(external.h ../external.cpp MDHOTDATA_SOURCES)
+
add_library(mdhotdata_full ${MDHOTDATA_SOURCES})
diff --git a/src/md/runtime/dac/CMakeLists.txt b/src/md/runtime/dac/CMakeLists.txt
index 620bc5bbc5..63ce26a1e9 100644
--- a/src/md/runtime/dac/CMakeLists.txt
+++ b/src/md/runtime/dac/CMakeLists.txt
@@ -2,4 +2,6 @@
include(${CLR_DIR}/dac.cmake)
include(../../md_dac.cmake)
+add_precompiled_header(stdafx.h ../stdafx.cpp MDRUNTIME_SOURCES)
+
add_library(mdruntime_dac ${MDRUNTIME_SOURCES}) \ No newline at end of file
diff --git a/src/md/runtime/dbi/CMakeLists.txt b/src/md/runtime/dbi/CMakeLists.txt
index 5276477f1c..2cc8420c27 100644
--- a/src/md/runtime/dbi/CMakeLists.txt
+++ b/src/md/runtime/dbi/CMakeLists.txt
@@ -1,2 +1,3 @@
include(../../md_dbi.cmake)
+add_precompiled_header(stdafx.h ../stdafx.cpp MDRUNTIME_SOURCES)
add_library(mdruntime-dbi ${MDRUNTIME_SOURCES}) \ No newline at end of file
diff --git a/src/md/runtime/wks/CMakeLists.txt b/src/md/runtime/wks/CMakeLists.txt
index bbb718d98e..4822219c8c 100644
--- a/src/md/runtime/wks/CMakeLists.txt
+++ b/src/md/runtime/wks/CMakeLists.txt
@@ -1,3 +1,5 @@
include(../../md_wks.cmake)
+
+add_precompiled_header(stdafx.h ../stdafx.cpp MDRUNTIME_SOURCES)
add_library(mdruntime_wks ${MDRUNTIME_SOURCES})
diff --git a/src/md/winmd/dac/CMakeLists.txt b/src/md/winmd/dac/CMakeLists.txt
index 44806103c6..31e6bb0deb 100644
--- a/src/md/winmd/dac/CMakeLists.txt
+++ b/src/md/winmd/dac/CMakeLists.txt
@@ -2,4 +2,5 @@
include(${CLR_DIR}/dac.cmake)
include(../../md_dbi.cmake)
+add_precompiled_header(stdafx.h ../stdafx.cpp MDWINMD_SOURCES)
add_library(mdwinmd_dac ${MDWINMD_SOURCES})
diff --git a/src/md/winmd/dbi/CMakeLists.txt b/src/md/winmd/dbi/CMakeLists.txt
index 12a06e29e1..707b6b4c74 100644
--- a/src/md/winmd/dbi/CMakeLists.txt
+++ b/src/md/winmd/dbi/CMakeLists.txt
@@ -1,2 +1,4 @@
include(../../md_dbi.cmake)
+
+add_precompiled_header(stdafx.h ../stdafx.cpp MDWINMD_SOURCES)
add_library(mdwinmd_dbi ${MDWINMD_SOURCES}) \ No newline at end of file
diff --git a/src/md/winmd/wks/CMakeLists.txt b/src/md/winmd/wks/CMakeLists.txt
index 226dfb31cf..67b1f686f5 100644
--- a/src/md/winmd/wks/CMakeLists.txt
+++ b/src/md/winmd/wks/CMakeLists.txt
@@ -1,2 +1,4 @@
include(../../md_wks.cmake)
+
+add_precompiled_header(stdafx.h ../stdafx.cpp MDWINMD_SOURCES)
add_library(mdwinmd_wks ${MDWINMD_SOURCES}) \ No newline at end of file
diff --git a/src/utilcode/cycletimer.cpp b/src/utilcode/cycletimer.cpp
index 3410669738..18b400d82c 100644
--- a/src/utilcode/cycletimer.cpp
+++ b/src/utilcode/cycletimer.cpp
@@ -3,6 +3,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
+#include "stdafx.h"
#include "cycletimer.h"
#include "winbase.h"
diff --git a/src/utilcode/dac/CMakeLists.txt b/src/utilcode/dac/CMakeLists.txt
index ff6c48581a..1a5d40b3c4 100644
--- a/src/utilcode/dac/CMakeLists.txt
+++ b/src/utilcode/dac/CMakeLists.txt
@@ -6,5 +6,7 @@ if(CLR_CMAKE_PLATFORM_UNIX)
add_dependencies(utilcode_dac CoreClrPal)
else()
add_definitions(-DSELF_NO_HOST)
- add_library(utilcode_dac STATIC ${UTILCODE_SOURCES} ../hostimpl.cpp)
+ list(APPEND UTILCODE_SOURCES ../hostimpl.cpp)
+ add_precompiled_header(stdafx.h ../stdafx.cpp UTILCODE_SOURCES)
+ add_library(utilcode_dac STATIC ${UTILCODE_SOURCES})
endif(CLR_CMAKE_PLATFORM_UNIX) \ No newline at end of file
diff --git a/src/utilcode/dyncrt/CMakeLists.txt b/src/utilcode/dyncrt/CMakeLists.txt
index 36f2ef4872..be2e2cca38 100644
--- a/src/utilcode/dyncrt/CMakeLists.txt
+++ b/src/utilcode/dyncrt/CMakeLists.txt
@@ -3,5 +3,6 @@ if(CLR_CMAKE_PLATFORM_UNIX)
add_library(utilcode STATIC ${UTILCODE_SOURCES})
add_dependencies(utilcode CoreClrPal)
else()
+ add_precompiled_header(stdafx.h ../stdafx.cpp UTILCODE_SOURCES)
add_library(utilcode STATIC ${UTILCODE_SOURCES})
endif(CLR_CMAKE_PLATFORM_UNIX) \ No newline at end of file
diff --git a/src/utilcode/lazycow.cpp b/src/utilcode/lazycow.cpp
index 9a5fcfbf1c..6411ac4132 100644
--- a/src/utilcode/lazycow.cpp
+++ b/src/utilcode/lazycow.cpp
@@ -6,6 +6,8 @@
// LazyCOW.cpp
//
+#include "stdafx.h"
+
#include "pedecoder.h"
#include "volatile.h"
#include "lazycow.h"
diff --git a/src/utilcode/staticnohost/CMakeLists.txt b/src/utilcode/staticnohost/CMakeLists.txt
index 254ada1ff9..ea662454f7 100644
--- a/src/utilcode/staticnohost/CMakeLists.txt
+++ b/src/utilcode/staticnohost/CMakeLists.txt
@@ -4,7 +4,7 @@ if(WIN32)
add_definitions(-D_CRTIMP=) # use static version of crt
list(APPEND UTILCODE_SOURCES ../hostimpl.cpp)
-
+ add_precompiled_header(stdafx.h ../stdafx.cpp UTILCODE_SOURCES)
add_library(utilcodestaticnohost STATIC ${UTILCODE_SOURCES})
elseif(CLR_CMAKE_PLATFORM_UNIX)
add_library(utilcodestaticnohost STATIC ${UTILCODE_SOURCES})
diff --git a/src/vm/dac/CMakeLists.txt b/src/vm/dac/CMakeLists.txt
index 987b3f5695..0b69d7efc0 100644
--- a/src/vm/dac/CMakeLists.txt
+++ b/src/vm/dac/CMakeLists.txt
@@ -1,4 +1,5 @@
include(${CLR_DIR}/dac.cmake)
+add_precompiled_header(common.h ../common.cpp VM_SOURCES_DAC)
add_library(cee_dac ${VM_SOURCES_DAC}) \ No newline at end of file
diff --git a/src/vm/wks/CMakeLists.txt b/src/vm/wks/CMakeLists.txt
index 49d45ccc2f..573ec6f0fb 100644
--- a/src/vm/wks/CMakeLists.txt
+++ b/src/vm/wks/CMakeLists.txt
@@ -1,7 +1,14 @@
+if (WIN32)
+ add_precompiled_header(common.h ../common.cpp VM_SOURCES_WKS)
+ # mscorlib.cpp does not compile with precompiled header file
+ set_source_files_properties(../mscorlib.cpp PROPERTIES COMPILE_FLAGS "/Y-")
+ # .c file cannot use cpp precompiled header
+ set_source_files_properties(../microsoft.comservices_i.c PROPERTIES COMPILE_FLAGS "/Y-")
+endif (WIN32)
+
add_library(cee_wks ${VM_SOURCES_WKS} ${VM_SOURCES_WKS_AMD64_ASM})
if (WIN32)
-
# Get the current list of definitions
get_compile_definitions(DEFINITIONS)