mirror of
https://github.com/postgres/postgres.git
synced 2025-06-08 22:02:03 +03:00
Disable linker warning 4197 on Win64, that is caused by the fact that we export
symbols both using __declspec(dllexport) (via the PGDLLIMPORT macro) and using full-dll-export. This works without warning on Win32, but not on Win64. In passing, fix the fact that the framework could never deal with more than one disbled linker warning - because MSVC wants commas between linker warnings, and semicolons between compiler warnings...
This commit is contained in:
parent
ce92f8b463
commit
04de9be910
@ -3,7 +3,7 @@ package Project;
|
|||||||
#
|
#
|
||||||
# Package that encapsulates a Visual C++ project file generation
|
# Package that encapsulates a Visual C++ project file generation
|
||||||
#
|
#
|
||||||
# $PostgreSQL: pgsql/src/tools/msvc/Project.pm,v 1.24 2010/01/02 15:18:42 mha Exp $
|
# $PostgreSQL: pgsql/src/tools/msvc/Project.pm,v 1.25 2010/01/05 11:12:50 mha Exp $
|
||||||
#
|
#
|
||||||
use Carp;
|
use Carp;
|
||||||
use strict;
|
use strict;
|
||||||
@ -333,7 +333,7 @@ sub DisableLinkerWarnings
|
|||||||
{
|
{
|
||||||
my ($self, $warnings) = @_;
|
my ($self, $warnings) = @_;
|
||||||
|
|
||||||
$self->{disablelinkerwarnings} .= ';' unless ($self->{disablelinkerwarnings} eq '');
|
$self->{disablelinkerwarnings} .= ',' unless ($self->{disablelinkerwarnings} eq '');
|
||||||
$self->{disablelinkerwarnings} .= $warnings;
|
$self->{disablelinkerwarnings} .= $warnings;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -348,6 +348,10 @@ sub Save
|
|||||||
$self->FullExportDLL($self->{name} . ".lib");
|
$self->FullExportDLL($self->{name} . ".lib");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Warning 4197 is about double exporting, disable this per
|
||||||
|
# http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=99193
|
||||||
|
$self->DisableLinkerWarnings('4197') if ($self->{platform} eq 'x64');
|
||||||
|
|
||||||
# Dump the project
|
# Dump the project
|
||||||
open(F, ">$self->{name}.vcproj") || croak("Could not write to $self->{name}.vcproj\n");
|
open(F, ">$self->{name}.vcproj") || croak("Could not write to $self->{name}.vcproj\n");
|
||||||
$self->WriteHeader(*F);
|
$self->WriteHeader(*F);
|
||||||
@ -494,7 +498,9 @@ sub WriteConfiguration
|
|||||||
}
|
}
|
||||||
$libs =~ s/ $//;
|
$libs =~ s/ $//;
|
||||||
$libs =~ s/__CFGNAME__/$cfgname/g;
|
$libs =~ s/__CFGNAME__/$cfgname/g;
|
||||||
|
|
||||||
my $targetmachine = $self->{platform} eq 'Win32' ? 1 : 17;
|
my $targetmachine = $self->{platform} eq 'Win32' ? 1 : 17;
|
||||||
|
|
||||||
print $f <<EOF;
|
print $f <<EOF;
|
||||||
<Configuration Name="$cfgname|$self->{platform}" OutputDirectory=".\\$cfgname\\$self->{name}" IntermediateDirectory=".\\$cfgname\\$self->{name}"
|
<Configuration Name="$cfgname|$self->{platform}" OutputDirectory=".\\$cfgname\\$self->{name}" IntermediateDirectory=".\\$cfgname\\$self->{name}"
|
||||||
ConfigurationType="$cfgtype" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="FALSE" CharacterSet="2" WholeProgramOptimization="$p->{wholeopt}">
|
ConfigurationType="$cfgtype" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="FALSE" CharacterSet="2" WholeProgramOptimization="$p->{wholeopt}">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user