[m-rev.] for review: support MS VC 2015
Julien Fischer
jfischer at opturion.com
Fri Mar 18 13:47:35 AEDT 2016
Hi,
On Fri, 18 Mar 2016, Sebastian Godelet wrote:
> 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
I'll go ahead and add this one now. There's at least one other spot, in
tools/bootcheck, that requires a similar change.
> 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?
The configuration triplets don't include which C compiler is being used.
(They're a bit useless with MSVC anyway other than to say what the
intended build environment is.)
> Or should autoconfigure figure out the compiler architecture (which is fairly easy for cl)?
I think we want to encode this information in the C compiler type
setting (e.g. the variable C_COMPILER_TYPE in configure). indeed we
probably want to have a separate C compiler type for msvc targetting
x64 (or arm etc).
Julien.
More information about the reviews
mailing list