afrolov / gyp

Automatically exported from code.google.com/p/gyp
0 stars 0 forks source link

Add support for platform generator on MSVC vcproj output #87

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is necessary to support x64 build on Windows on MSVS. In theory, the GYP 
files should only have an 
entry to add this:
msvs_supported_platforms = ['win32', 'x64']

with the default to:
msvs_supported_platforms = ['win32']

for 64-bits only projects
msvs_supported_platforms = ['x64']

Here's the simplest project you can have:

<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
    ProjectType="Visual C++"
    Version="9.00"
    Name="foo"
    ProjectGUID="{88CEA6B7-8686-4421-B962-F7667D9E1DBB}"
    RootNamespace="foo"
    Keyword="Win32Proj"
    TargetFrameworkVersion="196613"
    >
    <Platforms>
        <Platform
            Name="Win32"
        />
        <Platform
            Name="x64"
        />
    </Platforms>
    <ToolFiles>
    </ToolFiles>
    <Configurations>
        <Configuration
            Name="Debug|Win32"
            ConfigurationType="1"
            >
        </Configuration>
        <Configuration
            Name="Release|Win32"
            ConfigurationType="1"
            >
        </Configuration>
        <Configuration
            Name="Debug|x64"
            ConfigurationType="1"
            >
            <Tool
                Name="VCMIDLTool"
                TargetEnvironment="3"
            />
            <Tool
                Name="VCLinkerTool"
                TargetMachine="17"
            />
        </Configuration>
        <Configuration
            Name="Release|x64"
            ConfigurationType="1"
            >
            <Tool
                Name="VCMIDLTool"
                TargetEnvironment="3"
            />
            <Tool
                Name="VCLinkerTool"
                TargetMachine="17"
            />
        </Configuration>
    </Configurations>
    <References>
    </References>
    <Files>
        <File
            RelativePath=".\bar.cc"
            >
        </File>
    </Files>
    <Globals>
    </Globals>
</VisualStudioProject>

Original issue reported on code.google.com by maruel@chromium.org on 8 Oct 2009 at 8:02

GoogleCodeExporter commented 9 years ago
This is already kind of supportable (?) by specifying 'configurations' with 
different 'configuration_platform' 
settings.  See the 'Win32' settings in build/common.gypi, for example.  We 
should be able to support x64 right 
now by setting up an additional configuration.

However, this isn't a very convenient interface because configurations can't 
inherit from each other, so we'd end 
up with a lot of duplication.  Closing this as WontFix right now on the 
assumption that setting up a new 'x64' 
configuration is at least sufficient to not block 64-bit Windows development.  
If you'd like to re-open this issue 
to emphasize trying to improve the interface (or because we misunderstood the 
intent), please do so.

Original comment by sgk@chromium.org on 21 Oct 2009 at 6:24

GoogleCodeExporter commented 9 years ago

Original comment by jschuh@chromium.org on 2 Oct 2012 at 4:17

GoogleCodeExporter commented 9 years ago
The comments here are somewhat obsolete.
Since this got marked won't fix, we've added inheritance to configurations are 
building many components of chromium as 64-bit.
In fact there's a change coming from an outside contributor to add support for 
other target platforms like game system dev kits.
There would be some changes required in common.gypi, but gyp should ready.
Marking Fixed.

Original comment by bradnelson@google.com on 2 Oct 2012 at 4:28

GoogleCodeExporter commented 9 years ago

Original comment by jschuh@chromium.org on 21 Dec 2012 at 5:50