diff options
author | Andres Freund <andres@anarazel.de> | 2022-09-19 15:34:50 -0700 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2022-09-19 15:39:35 -0700 |
commit | 70df2df1cc89e69e31b31b6aa0d65fd72935af38 (patch) | |
tree | 4fd0d0b7985e39f12e22fe698d254c3f3e81c547 /src/tools/msvc/MSBuildProject.pm | |
parent | 1091b48cd761abc7f697fa9c4e018c46763b46fb (diff) | |
download | postgresql-70df2df1cc89e69e31b31b6aa0d65fd72935af38.tar.gz postgresql-70df2df1cc89e69e31b31b6aa0d65fd72935af38.zip |
Extend gendef.pl in preparation for meson
The main issue with using gendef.pl as-is for meson is that with meson the
filenames are a bit longer, exceeding the max commandline length when calling
dumpbin with all objects. As it's easier to pass in a library anyway, do so.
The .def file location, input and temporary file location need to be tunable
as well.
This also fixes a bug in gendef.pl: The logic when to regenerate was broken
and never avoid regenerating.
Author: Andres Freund <andres@anarazel.de>
Reviewed-By: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Discussion: https://postgr.es/m/20220809071055.rgikv3qn74ypnnbb@awork3.anarazel.de
Discussion: https://postgr.es/m/7dae5979-c6c0-cec5-7a36-76a85aa8053d@enterprisedb.com
Diffstat (limited to 'src/tools/msvc/MSBuildProject.pm')
-rw-r--r-- | src/tools/msvc/MSBuildProject.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm index 594729ceb7d..58590fdac29 100644 --- a/src/tools/msvc/MSBuildProject.pm +++ b/src/tools/msvc/MSBuildProject.pm @@ -312,6 +312,8 @@ sub WriteItemDefinitionGroup my $targetmachine = $self->{platform} eq 'Win32' ? 'MachineX86' : 'MachineX64'; + my $arch = + $self->{platform} eq 'Win32' ? 'x86' : 'x86_64'; my $includes = join ';', @{ $self->{includes} }, ""; @@ -380,7 +382,7 @@ EOF print $f <<EOF; <PreLinkEvent> <Message>Generate DEF file</Message> - <Command>perl src\\tools\\msvc\\gendef.pl $cfgname\\$self->{name} $self->{platform}</Command> + <Command>perl src\\tools\\msvc\\gendef.pl --arch $arch --deffile $cfgname\\$self->{name}\\$self->{name}.def $cfgname\\$self->{name}</Command> </PreLinkEvent> EOF } |