fix probs w/pdb files
This commit is contained in:
parent
21ae42085a
commit
cd853a556d
|
|
@ -74,22 +74,14 @@
|
|||
#define dlllib dll
|
||||
#endif
|
||||
|
||||
// NO_PCH is just a user override, if it is false,
|
||||
// we still only do pch on dirs that request it
|
||||
#if $[eq $[NO_PCH],]
|
||||
#define DO_PCH 1
|
||||
#endif
|
||||
|
||||
#define CFLAGS_SHARED
|
||||
|
||||
#if $[NO_PCH]
|
||||
// different .pdb for every .obj
|
||||
// we can probably just use the second case for everything built w/nmake
|
||||
// but I dont want to risk changing it right now, so only change pch case
|
||||
#defer DEBUG_TYPE_FLAGS /Zi /Fd"$[osfilename $[target:%.obj=%.pdb]]"
|
||||
#else
|
||||
// for pch, .pdb file name must be the same for obj and pch header obj
|
||||
#defer DEBUG_TYPE_FLAGS /Zi /Fd"$[osfilename $[pdb_filename].pdb]"
|
||||
#endif
|
||||
|
||||
#include $[THISDIRPREFIX]compilerSettings.pp
|
||||
|
||||
#define WARNING_LEVEL_FLAG /W3
|
||||
|
|
|
|||
|
|
@ -728,7 +728,6 @@ $[TAB] $[COMPILE_C]
|
|||
#define source $[file]
|
||||
#define ipath $[file_ipath]
|
||||
|
||||
#define pdb_filename $[st_dir]/$[TARGET(lib_target)]
|
||||
|
||||
#if $[DO_PCH]
|
||||
// best way to find out if file use pch (and needs /Yu) is to check dependencies
|
||||
|
|
@ -736,10 +735,14 @@ $[TAB] $[COMPILE_C]
|
|||
#define target_pch $[subst \./,\,$[patsubst %.h,$[so_dir]\%.pch,$[filter %_headers.h, $[dependencies $[file]]]]]
|
||||
#endif
|
||||
|
||||
// COMPILE_LINE uses flags which uses pdb_filename
|
||||
|
||||
#define flags $[c++flags] $[CFLAGS_SHARED] $[all_sources $[building_var:%=/D%],$[file]]
|
||||
|
||||
#if $[target_pch]
|
||||
#define COMPILE_LINE $[COMPILE_C_WITH_PCH]
|
||||
// for pch, pch .pdb filename must match .obj filename
|
||||
#define pdb_filename $[osfilename $[so_dir]/$[TARGET(lib_target)]] // assumes pch only occurs in lib_target scope, not metalib_target or in interrogate
|
||||
#define COMPILE_LINE $[patsubst /Fd%, /Fd"$[pdb_filename].pdb",$[COMPILE_C_WITH_PCH]]
|
||||
#else
|
||||
#define COMPILE_LINE $[COMPILE_C++]
|
||||
#endif
|
||||
|
|
@ -759,7 +762,7 @@ $[TAB] $[COMPILE_LINE]
|
|||
#define source $[file]
|
||||
#define ipath $[file_ipath]
|
||||
|
||||
#define pdb_filename $[st_dir]/$[TARGET(lib_target)]
|
||||
#define pdb_filename $[st_dir]/$[TARGET(lib_target metalib_target)]
|
||||
|
||||
#if $[DO_PCH]
|
||||
// best way to find out if file use pch (and needs /Yu) is to check dependencies
|
||||
|
|
@ -770,7 +773,9 @@ $[TAB] $[COMPILE_LINE]
|
|||
#define flags $[c++flags] $[all_sources $[building_var:%=/D%],$[file]]
|
||||
|
||||
#if $[target_pch]
|
||||
#define COMPILE_LINE $[COMPILE_C_WITH_PCH]
|
||||
// for pch, pch .pdb filename must match .obj filename
|
||||
#define pdb_filename $[osfilename $[st_dir]/$[TARGET(lib_target)]] // assumes pch only occurs in lib_target scope, not metalib_target or in interrogate
|
||||
#define COMPILE_LINE $[patsubst /Fd%, /Fd"$[pdb_filename].pdb",$[COMPILE_C_WITH_PCH]]
|
||||
#else
|
||||
#define COMPILE_LINE $[COMPILE_C++]
|
||||
#endif
|
||||
|
|
@ -787,11 +792,14 @@ $[TAB] $[COMPILE_LINE]
|
|||
#foreach file $[pch_header_source]
|
||||
#define target_pch $[patsubst %.h,$[st_dir]\%.pch,$[file]]
|
||||
#define target_obj $[patsubst %.h,$[st_dir]\%.obj,$[file]]
|
||||
#define pdb_filename $[st_dir]/$[TARGET(lib_target)]
|
||||
#define target $[target_obj]
|
||||
#define source $[file]
|
||||
#define ipath $[file_ipath]
|
||||
#define flags $[c++flags] $[CFLAGS_SHARED] $[all_sources $[building_var:%=/D%],$[file]]
|
||||
|
||||
#define pdb_filename $[osfilename $[st_dir]/$[TARGET(lib_target)]] // assumes pch only occurs in lib_target scope, not metalib_target or in interrogate
|
||||
#define COMPILE_CXXSTYLE_PCH $[patsubst /Fd%, /Fd"$[pdb_filename].pdb",$[COMPILE_CXXSTYLE_PCH]]
|
||||
|
||||
// Yacc must run before some files can be compiled, so all files
|
||||
// depend on yacc having run.
|
||||
$[target_obj] : $[source] $[dependencies $[file]]
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@
|
|||
#define OPTFLAGS /O2 /Ob1 /G6
|
||||
#define OPT1FLAGS /GZ
|
||||
|
||||
#defer DEBUGFLAGS /MDd $[BROWSEINFO_FLAG] $[DEBUG_TYPE_FLAGS]
|
||||
// #defer DEBUGFLAGS /MDd $[BROWSEINFO_FLAG] $[DEBUG_TYPE_FLAGS]
|
||||
#defer DEBUGFLAGS /MDd /Zi $[BROWSEINFO_FLAG] /Fd"$[osfilename $[target:%.obj=%.pdb]]"
|
||||
#define RELEASEFLAGS /MD
|
||||
|
||||
// in case we have mixed intel/msvc build
|
||||
|
|
|
|||
Loading…
Reference in New Issue