mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 09:23:03 -04:00
fix multiproc build issue
This commit is contained in:
parent
7b002d2901
commit
7987c6873f
@ -6,8 +6,8 @@
|
||||
// Template.gmsvc.pp.
|
||||
//
|
||||
|
||||
#if $[< $[PPREMAKE_VERSION],0.55]
|
||||
#error You need at least ppremake version 0.56 to use BUILD_TYPE gmsvc.
|
||||
#if $[< $[PPREMAKE_VERSION],0.58]
|
||||
#error You need at least ppremake version 0.58 to use BUILD_TYPE gmsvc.
|
||||
#endif
|
||||
|
||||
#defun get_metalibs target,complete_libs
|
||||
@ -72,10 +72,11 @@
|
||||
#defer CFLAGS_OPT3 $[CDEFINES_OPT3:%=/D%] /MD /Gi-
|
||||
#defer CFLAGS_OPT4 $[CDEFINES_OPT4:%=/D%] /MD /Gi-
|
||||
|
||||
#defer LDFLAGS_OPT1 /debug /incremental:no
|
||||
#defer LDFLAGS_OPT2 /debug /incremental:no
|
||||
#defer LDFLAGS_OPT3 /fixed:no
|
||||
#defer LDFLAGS_OPT4 /fixed:no
|
||||
// NODEFAULTLIB ensures static libs linked in will connect to the correct msvcrt, so no debug/release mixing occurs
|
||||
#defer LDFLAGS_OPT1 /debug /incremental:no /NODEFAULTLIB:MSVCRT.LIB /WARN:3
|
||||
#defer LDFLAGS_OPT2 /debug /incremental:no /NODEFAULTLIB:MSVCRT.LIB /WARN:3
|
||||
#defer LDFLAGS_OPT3 /fixed:no /NODEFAULTLIB:MSVCRTD.LIB /WARN:3
|
||||
#defer LDFLAGS_OPT4 /fixed:no /NODEFAULTLIB:MSVCRTD.LIB
|
||||
|
||||
// $[dllext] will be "_d" for debug builds, and empty for non-debug
|
||||
// builds. This is the extra bit of stuff we tack on to the end of a
|
||||
@ -97,7 +98,7 @@
|
||||
#defer STATIC_LIB_C++ $[STATIC_LIB_C]
|
||||
|
||||
//#defer ver_resource $[directory]\ver.res
|
||||
//#defer SHARED_LIB_C link /nologo /dll $[LDFLAGS_OPT$[OPTIMIZE]] /OUT:"$[osfilename $[target]]" $[sources] "$[ver_resource]" $[decygwin %,/LIBPATH:"%",$[lpath]] $[patsubst %.lib,%.lib,%,lib%.lib,$[libs]]
|
||||
//#defer SHARED_LIB_C link /nologo /dll /VERBOSE:LIB $[LDFLAGS_OPT$[OPTIMIZE]] /OUT:"$[osfilename $[target]]" $[sources] $[decygwin %,/LIBPATH:"%",$[lpath]] $[patsubst %.lib,%.lib,%,lib%.lib,$[libs]]
|
||||
#defer SHARED_LIB_C link /nologo /dll $[LDFLAGS_OPT$[OPTIMIZE]] /OUT:"$[osfilename $[target]]" $[sources] $[decygwin %,/LIBPATH:"%",$[lpath]] $[patsubst %.lib,%.lib,%,lib%.lib,$[libs]]
|
||||
#defer SHARED_LIB_C++ $[SHARED_LIB_C]
|
||||
|
||||
|
@ -76,10 +76,11 @@
|
||||
#defer CFLAGS_OPT3 $[CDEFINES_OPT3:%=/D%] /MD /Gi-
|
||||
#defer CFLAGS_OPT4 $[CDEFINES_OPT4:%=/D%] /MD /Gi-
|
||||
|
||||
#defer LDFLAGS_OPT1 /debug /incremental:no
|
||||
#defer LDFLAGS_OPT2 /debug /incremental:no
|
||||
#defer LDFLAGS_OPT3 /fixed:no
|
||||
#defer LDFLAGS_OPT4 /fixed:no
|
||||
// NODEFAULTLIB ensures static libs linked in will connect to the correct msvcrt, so no debug/release mixing occurs
|
||||
#defer LDFLAGS_OPT1 /debug /incremental:no /NODEFAULTLIB:MSVCRT.LIB /WARN:3
|
||||
#defer LDFLAGS_OPT2 /debug /incremental:no /NODEFAULTLIB:MSVCRT.LIB /WARN:3
|
||||
#defer LDFLAGS_OPT3 /fixed:no /NODEFAULTLIB:MSVCRTD.LIB /WARN:3
|
||||
#defer LDFLAGS_OPT4 /fixed:no /NODEFAULTLIB:MSVCRTD.LIB
|
||||
|
||||
// $[dllext] will be "_d" for debug builds, and empty for non-debug
|
||||
// builds. This is the extra bit of stuff we tack on to the end of a
|
||||
@ -103,7 +104,6 @@
|
||||
#defer ver_resource $[directory]\ver.res
|
||||
|
||||
#defer SHARED_LIB_C link /nologo /dll $[LDFLAGS_OPT$[OPTIMIZE]] $[sources] "$[ver_resource]" $[decygwin %,/LIBPATH:"%",$[lpath]] $[patsubst %.lib,%.lib,%,lib%.lib,$[libs]] /OUT:"$[osfilename $[target]]"
|
||||
//#defer SHARED_LIB_C link /nologo /dll $[LDFLAGS_OPT$[OPTIMIZE]] $[sources] $[decygwin %,/LIBPATH:"%",$[lpath]] $[patsubst %.lib,%.lib,%,lib%.lib,$[libs]] /OUT:"$[osfilename $[target]]"
|
||||
#defer SHARED_LIB_C++ $[SHARED_LIB_C]
|
||||
|
||||
#defer LINK_BIN_C link /nologo $[LDFLAGS_OPT$[OPTIMIZE]] $[sources] $[decygwin %,/LIBPATH:"%",$[lpath]] $[patsubst %.lib,%.lib,%,lib%.lib,$[libs]] /OUT:"$[osfilename $[target]]"
|
||||
|
@ -340,19 +340,24 @@ $[varname] = $[sources]
|
||||
#define target $[so_dir]/lib$[TARGET]$[dllext].dll
|
||||
#define sources $($[varname])
|
||||
#define flags $[get_cflags] $[C++FLAGS] $[CFLAGS_OPT$[OPTIMIZE]] $[CFLAGS_SHARED] $[building_var:%=/D%]
|
||||
#define tmpverdatedirname $[directory]/$[subst /,-, $[target]]
|
||||
$[target] : $[sources] $[so_dir]/stamp $[dtool_ver_dir_cyg]/version.rc
|
||||
#define mybasename $[basename $[notdir $[target]]]
|
||||
#define tmpdirname_cyg $[directory]/$[mybasename]
|
||||
#define tmpdirname_win $[directory]\$[mybasename]
|
||||
|
||||
// not parallel (requires gmake 3.79) because of link.exe conflicts in TMP dir (see audiotraits dir)
|
||||
.NOTPARALLEL $[target] : $[sources] $[so_dir]/stamp $[dtool_ver_dir_cyg]/version.rc
|
||||
// first generate builddate for rc compiler
|
||||
// different .res names and mkdir used to solve multiproc build issues (have multiple verdate.h's and .res files)
|
||||
mkdir -p $[tmpverdatedirname]
|
||||
cl /nologo /EP "$[dtool_ver_dir]\verdate.cpp" > "$[decygwin %,%,$[tmpverdatedirname]]\verdate.h"
|
||||
rc /n /i"$[decygwin %,%,$[tmpverdatedirname]]" /fo"$[target]-ver.res" $[filter /D%, $[flags]] "$[dtool_ver_dir]\version.rc"
|
||||
mkdir -p $[tmpdirname_cyg] // this dir-creation-stuff is leftover from trying to resolve parallel link difficulties
|
||||
#define VER_RESOURCE "$[tmpdirname_win]\$[mybasename].res"
|
||||
cl /nologo /EP "$[dtool_ver_dir]\verdate.cpp" > "$[tmpdirname_win]\verdate.h"
|
||||
rc /n /i"$[tmpdirname_win]" /fo$[VER_RESOURCE] $[filter /D%, $[flags]] "$[dtool_ver_dir]\version.rc"
|
||||
#if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
|
||||
$[SHARED_LIB_C++] "$[decygwin %,%,$[target]-ver.res]"
|
||||
$[SHARED_LIB_C++] $[VER_RESOURCE]
|
||||
#else
|
||||
$[SHARED_LIB_C] "$[decygwin %,%,$[target]-ver.res]"
|
||||
$[SHARED_LIB_C] $[VER_RESOURCE]
|
||||
#endif
|
||||
|
||||
|
||||
$[so_dir]/lib$[TARGET]$[dllext].lib : $[so_dir]/lib$[TARGET]$[dllext].dll
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user