[m-rev.] for review: updates for Boehm GC build system
Julien Fischer
jfischer at opturion.com
Wed Jun 28 16:38:31 AEST 2023
For review by Peter.
With the diff below, Mercury now bootstraps with the 64-bit version of
MSVC in hlc.gc. (There are a handful of test failures due to "Windows
things", but it otherwise works.)
I'm not sure what the procedure is for making changes to our local
modifications to the Boehm collector -- there is a document in
compiler/notes but it is about updating the gc as a whole.
Julien.
----------------------------------
Updates for Boehm GC build system.
Mmakefile:
Build the 64-bit version of the collector when building MSVC.
Delete references to the mps garbage collector.
Makefile.direct:
Do not pass the deprecated --no-ansi option to the mnguc script.
diff --git a/Makefile.direct b/Makefile.direct
index f82fe2c..ac43aa3 100644
--- a/Makefile.direct
+++ b/Makefile.direct
@@ -51,7 +51,7 @@ AS_ABI_FLAG=$(ABI_FLAG)
# CC=cc $(ABI_FLAG)
# Mercury-specific definition of CC.
-CC=$(MERCURY_DIR)/scripts/mgnuc --grade $(GRADE) --no-ansi --no-check --no-mercury-stdlib-dir
+CC=$(MERCURY_DIR)/scripts/mgnuc --grade $(GRADE) --no-check --no-mercury-stdlib-dir
CXX=g++ $(ABI_FLAG)
# Needed only for "make c++", which adds the c++ interface.
diff --git a/Mmakefile b/Mmakefile
index 7faeac3..24e4fa1 100644
--- a/Mmakefile
+++ b/Mmakefile
@@ -1,5 +1,6 @@
#-----------------------------------------------------------------------------#
# Copyright (C) 1995-2004, 2006-2007, 2010, 2012 The University of Melbourne.
+# Copyright (C) 2014, 2019, 2022-2023 The Mercury team.
# This file may only be copied under the terms of the GNU General
# Public Licence - see the file COPYING in the Mercury distribution.
#-----------------------------------------------------------------------------#
@@ -20,11 +21,11 @@ include $(MERCURY_DIR)/Mmake.common
.PHONY: lib$(GC_GRADE)
-ifneq ("$(filter nogc mps,$(GC_GRADE))","")
+ifneq ("$(filter nogc,$(GC_GRADE))","")
# No need to build the Boehm garbage collector for grades which don't use it
# (this includes the .NET and Java backends, and for the C backend
-# grades with `--gc none', `--gc mps', or `--gc accurate').
+# grades with `--gc none' or `--gc accurate').
lib$(GC_GRADE):
@@ -69,7 +70,7 @@ submake: force
else
submake: force
MAKEFLAGS=""; export MAKEFLAGS; \
- nmake -f NT_MAKEFILE cdebug="$(CDEBUG)" nodebug=1 CPU=x86 MAKE_AS_LIB=1 gc.lib; \
+ nmake -f NT_MAKEFILE cdebug="$(CDEBUG)" nodebug=1 CPU="$(BOEHM_WINDOWS_CPU_TYPE)" MAKE_AS_LIB=1 gc.lib; \
cp gc.lib lib$(GC_GRADE).lib
endif
@@ -172,7 +173,7 @@ install_dirs:
-[ -d $(INSTALL_MERC_GC_LIB_DIR) ] || \
mkdir -p $(INSTALL_MERC_GC_LIB_DIR)
-ifneq ("$(filter nogc mps,$(GC_GRADE))","")
+ifneq ("$(filter nogc,$(GC_GRADE))","")
# No need to install the Boehm collector for grades which don't use it.
More information about the reviews
mailing list