]> granicus.if.org Git - gc/commitdiff
Update NT_MAKEFILE usage information in README files for Win32 and Win64
authorIvan Maidanski <ivmai@mail.ru>
Thu, 12 Jul 2018 07:40:41 +0000 (10:40 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 12 Jul 2018 07:40:41 +0000 (10:40 +0300)
Issue #223 (bdwgc).

* doc/README.win32 (Microsoft Tools): Provide a sample how to build
static library without threads support.
* doc/README.win64: Likewise.
* doc/README.win32 (Threads): Provide a sample how to build dynamic
collector with threads support using NT_MAKEFILE.
* doc/README.win64: Likewise.

doc/README.win32
doc/README.win64

index 6e772de709b63846e76782ac1da12e67bc9a70da..aa81e66eca07a4146cddebbbbf9cd540cbb6d6cc 100644 (file)
@@ -40,10 +40,13 @@ since we now separate heap sections with an unused page.)
 
 Microsoft Tools
 ---------------
-For Microsoft development tools, rename NT_MAKEFILE as
-MAKEFILE.  (Make sure that the CPU environment variable is defined
-to be i386.)  In order to use the gc_cpp.h C++ interface, all
-client code should include gc_cpp.h.
+For Microsoft development tools, type
+"nmake -f NT_MAKEFILE cpu=i386 make_as_lib=1 nothreads=1 nodebug=1"
+to build the release variant of the collector as a static library without
+threads support.
+
+In order to use the gc_cpp.h C++ interface, all client code should include
+gc_cpp.h.
 
 [See above for gctest.]
 
@@ -171,9 +174,15 @@ to the collector DLL still exists, but requires that both
 We generally recommend avoiding this if possible, since it seems to
 be less than 100% reliable.
 
-Use gc.mak instead of NT_MAKEFILE to build a version that supports
-both kinds of thread tracking.  To build the garbage collector
-test with VC++ from the command line, use
+To build the collector as a dynamic library which handles threads similarly
+to other platforms, type "nmake -f NT_MAKEFILE".  If automatic tracking of
+threads attached to the collector DLL (i.e. support of both kinds of thread
+tracking) is needed then delete "-DTHREAD_LOCAL_ALLOC" from NT_MAKEFILE
+manually before the build.
+
+The alternate way (not well tested) to build the dynamic library that supports
+both kinds of thread tracking is to use gc.mak instead of NT_MAKEFILE.
+To build the garbage collector test with VC++ from the command line, use
 
 nmake /F ".\gc.mak" CFG="gctest - Win32 Release"
 
index 82b9456c6c67508dae6ea6a3724ac24c7cb081a8..7714b5bc5579a1ffb37dc699d6e976aa89f89da6 100644 (file)
@@ -1,12 +1,11 @@
 64-bit Windows on AMD64/Intel EM64T is somewhat supported in the 7.0
 and later release.  A collector can be built with Microsoft Visual C++ 2005
 or with mingw-w64 gcc.
-More testing would clearly be helpful.
 
-NT_MAKEFILE has been used in this environment.  Uncomment the corresponding
-definitions of CPU and CVTRES_CPU variables (commenting out the ones for X86),
-and then type "nmake -f NT_MAKEFILE" in a Visual C++ command line window to
-build the dynamic library with threads support and the usual test programs.
+NT_MAKEFILE has been used in this environment.  Type
+"nmake -f NT_MAKEFILE cpu=AMD64 nodebug=1" in a Visual C++ command line
+window to build the release variant of the dynamic library with threads
+support and the usual test programs.
 To verify that the collector is at least somewhat functional, run gctest.exe.
 This should create gctest.gc.log after a few seconds.
 
@@ -16,9 +15,10 @@ that we're getting wrong instances of operator new/delete in some cases.)
 This process is completely analogous to NT_MAKEFILE usage
 for the 32-bit library version.
 
-A similar procedure using NT_MAKEFILE should be usable to
-build the static library (see comments for CFLAGS_SPECIFIC and LINK_GC
-variables in NT_MAKEFILE).
+A similar procedure using NT_MAKEFILE is applicable to build the static
+library - just pass "make_as_lib=1" as an extra argument to nmake.
+If needed, it is also possible to build the library without threads
+support - this could be done by passing "nothreads=1" argument to nmake.
 
 Note that some warnings have been explicitly turned off in the makefile.