[m-rev.] for review: support MS VC 2015

Sebastian Godelet sebastian.godelet at outlook.com
Fri Mar 18 12:43:39 AEDT 2016


Hi Julien,

I have missed your inline reply to my cl x64 question

> -----Original Message-----
> From: Julien Fischer [mailto:jfischer at opturion.com]
> Sent: Monday, March 07, 2016 12:24
> To: Sebastian Godelet <sebastian.godelet at outlook.com>
> Cc: Julien Fischer <jfischer at opturion.com>; Mercury Reviews
> <reviews at lists.mercurylang.org>
> Subject: RE: [m-rev.] for review: support MS VC 2015
> 
> 
> IIRC, the main spot that needs modifying is
> get_restricted_command_line_link_opts in
> compiler/compile_target_code.m.  Are there any others?
> 

This is the changes I made in the Mercury repository

diff --git a/compiler/compile_target_code.m b/compiler/compile_target_code.m
index f29b6bb..83523bf 100644
--- a/compiler/compile_target_code.m
+++ b/compiler/compile_target_code.m
@@ -2449,7 +2449,7 @@ get_restricted_command_line_link_opts(Globals, LinkTargetType,
                 ResCmdLinkFlags = [
                     "-nologo",
                     "-subsystem:console",
-                    "-machine:x86",
+                    "-machine:amd64",
                     "-entry:wmainCRTStartup",
                     "-defaultlib:libcmt"
                 ],
diff --git a/scripts/prepare_install_dir.in b/scripts/prepare_install_dir.in
index 08bcc4d..75b1cb6 100644
--- a/scripts/prepare_install_dir.in
+++ b/scripts/prepare_install_dir.in
@@ -43,7 +43,7 @@ mkdir ${installdir}/boehm_gc/cord
 mkdir ${installdir}/boehm_gc/include
 mkdir ${installdir}/boehm_gc/include/private
 mkdir ${installdir}/boehm_gc/tools
-cp boehm_gc/NT_MAKEFILE ${installdir}/boehm_gc
+cp boehm_gc/NT*_MAKEFILE ${installdir}/boehm_gc
 cp boehm_gc/*.[Mm]ak ${installdir}/boehm_gc
 cp boehm_gc/Makefile* ${installdir}/boehm_gc
 cp boehm_gc/Mmake* ${installdir}/boehm_g

And this is the change I made in the bdwgc repository:

diff --git a/Mmakefile b/Mmakefile
index 92779e6..b5a996b 100644
--- a/Mmakefile
+++ b/Mmakefile
@@ -69,7 +69,7 @@ submake: force
 else
 submake: force
 	MAKEFLAGS=""; export MAKEFLAGS; \
-	nmake -f NT_MAKEFILE cdebug="$(CDEBUG)" nodebug=1 gc.lib; \
+	nmake -f NT_X64_STATIC_THREADS_MAKEFILE cdebug="$(CDEBUG)" nodebug=1 gc.lib; \
 	cp gc.lib lib$(GC_GRADE).lib
 endif

Now the question is on how to make this (auto-)configurable?
Should the scripts parse the --host triple? How should that look like then?
Or should autoconfigure figure out the compiler architecture (which is fairly easy for cl)?

Cheers,

Sebastian



More information about the reviews mailing list