Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-12-20Remove MSVC scriptsMichael Paquier
This commit removes all the scripts located in src/tools/msvc/ to build PostgreSQL with Visual Studio on Windows, meson becoming the recommended way to achieve that. The scripts held some information that is still relevant with meson, information kept and moved to better locations. Comments that referred directly to the scripts are removed. All the documentation still relevant that was in install-windows.sgml has been moved to installation.sgml under a new subsection for Visual. All the content specific to the scripts is removed. Some adjustments for the documentation are planned in a follow-up set of changes. Author: Michael Paquier Reviewed-by: Peter Eisentraut, Andres Freund Discussion: https://postgr.es/m/ZQzp_VMJcerM1Cs_@paquier.xyz
2023-06-12src/tools/msvc: Move all.sym temporary file back to Debug/postgres.Noah Misch
Commit 70df2df1cc89e69e31b31b6aa0d65fd72935af38 moved it to the top_srcdir, where it caused "git status" noise.
2023-05-19Pre-beta mechanical code beautification.Tom Lane
Run pgindent, pgperltidy, and reformat-dat-files. This set of diffs is a bit larger than typical. We've updated to pg_bsd_indent 2.1.2, which properly indents variable declarations that have multi-line initialization expressions (the continuation lines are now indented one tab stop). We've also updated to perltidy version 20230309 and changed some of its settings, which reduces its desire to add whitespace to lines to make assignments etc. line up. Going forward, that should make for fewer random-seeming changes to existing code. Discussion: https://postgr.es/m/20230428092545.qfb3y5wcu4cm75ur@alvherre.pgsql
2023-01-02Update copyright for 2023Bruce Momjian
Backpatch-through: 11
2022-09-19Extend gendef.pl in preparation for mesonAndres Freund
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
2022-08-28Enable RandomizedBaseAddress (ASLR) on Windows with MSVC buildsMichael Paquier
This has as effect to add /DYNAMICBASE to the .dll and .exe files generated by the builds, undoing 7f3e17b. Note that ASLR was already enabled in MinGW as we have never added --disable-dynamicbase there. This change will ease a bit the integration of arm64 with MSVC, as ASLR support is mandatory in this case. So, thanks to this commit, we have no need to make ASLR conditional depending on the architecture used for the build. Andres Freund has done a lot of testing with this option while working on meson, without seeing /DYNAMICBASE as being a problem in the Windows builds of the CI. Personally, not supporting anything older than Windows 10 on HEAD makes me feel safer about this change, as we have seen ASLR with being a problem in process invocation particularly with Windows 8 and server 2012 back in 2014, even if Windows 10 was not really a thing back then. 45e004f is also something that can help in making the process invocation more stable. We are very early in the development of Postgres 16, giving a lot of room to detect stability issues if any. Discussion: https://postgr.es/m/20220826012907.gjw3jdqdgsts5y65@awork3.anarazel.de
2022-07-14Remove support for Visual Studio 2013Michael Paquier
No members of the buildfarm are using this version of Visual Studio, resulting in all the code cleaned up here as being mostly dead, and VS2017 is the oldest version still supported. More versions could be cut, but the gain would be minimal, while removing only VS2013 has the advantage to remove from the core code all the dependencies on the value defined by _MSC_VER, where compatibility tweaks have accumulated across the years mostly around locales and strtof(), so that's a nice isolated cleanup. Note that this commit additionally allows a revert of 3154e16. The versions of Visual Studio now supported range from 2015 to 2022. Author: Michael Paquier Reviewed-by: Juan José Santamaría Flecha, Tom Lane, Thomas Munro, Justin Pryzby Discussion: https://postgr.es/m/YoH2IMtxcS3ncWn+@paquier.xyz
2022-05-12Pre-beta mechanical code beautification.Tom Lane
Run pgindent, pgperltidy, and reformat-dat-files. I manually fixed a couple of comments that pgindent uglified.
2022-01-08Update copyright for 2022Bruce Momjian
Backpatch-through: 10
2021-11-24Add support for Visual Studio 2022 in build scriptsMichael Paquier
Documentation and any code paths related to VS are updated to keep the whole consistent. Similarly to 2017 and 2019, the version of VS and the version of nmake that we use to determine which code paths to use for the build are still inconsistent in their own way. Backpatch down to 10, so as buildfarm members are able to use this new version of Visual Studio on all the stable branches supported. Author: Hans Buschmann Discussion: https://postgr.es/m/1633101364685.39218@nidsa.net Backpatch-through: 10
2021-07-28Make the includes field an array in MSVC build scriptsDavid Rowley
Previously the 'includes' field was a string. It's slightly nicer to manage this when it's defined as an array instead. This allows us to more easily detect and eliminate duplicates. Reviewed-by: Álvaro Herrera, Andrew Dunstan, Dagfinn Ilmari Mannsåker Discussion: https://postgr.es/m/CAApHDvpo6g5csCTjc_0C7DMvgFPomVb0Rh-AcW5afd=Ya=LRuw@mail.gmail.com
2021-05-07Add a copyright notice to perl files lacking one.Andrew Dunstan
2020-03-25Define EXEC_BACKEND in pg_config_manual.hPeter Eisentraut
It was for unclear reasons defined in a separate location, which makes it more cumbersome to override for testing, and it also did not have any prominent documentation. Move to pg_config_manual.h, where similar things are already collected. The previous definition on the command-line had the effect of defining it to the value 1, but now that we don't need that anymore we just define it to empty, to simplify manual editing a bit. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/flat/b7053ba8-b008-5335-31de-2fe4fe41ef0f%402ndquadrant.com
2019-07-25Fix syntax error in commit 20e99cddd.Tom Lane
Per buildfarm.
2019-07-25Honor MSVC WindowsSDKVersion if setAndrew Dunstan
Add a line to the project file setting the target SDK. Otherwise, in for example VS2017, if the default but optional 8.1 SDK is not installed the build will fail. Patch from Peifeng Qiu, slightly edited by me. Discussion: https://postgr.es/m/CABmtVJhw1boP_bd4=b3Qv5YnqEdL696NtHFi2ruiyQ6mFHkeQQ@mail.gmail.com Backpatch to all live branches.
2019-07-02Add support for Visual Studio 2019 in build scriptsMichael Paquier
This fixes at the same time a set of inconsistencies in the documentation and the scripts related to the versions of Windows SDK supported. Author: Haribabu Kommi Reviewed-by: Andrew Dunstan, Juan José Santamaría Flecha, Michael Paquier Discussion: https://postgr.es/m/CAJrrPGcfqXhfPyMrny9apoDU7M1t59dzVAvoJ9AeAh5BJi+UzA@mail.gmail.com
2018-08-24Require C99 (and thus MSCV 2013 upwards).Andres Freund
In 86d78ef50e01 I enabled configure to check for C99 support, with the goal of checking which platforms support C99. While there are a few machines without C99 support among our buildfarm animals, de-supporting them for v12 was deemed acceptable. While not tested in aforementioned commit, the biggest increase in minimum compiler version comes from MSVC, which gained C99 support fairly late. The subset in MSVC 2013 is sufficient for our needs, at this point. While that is a significant increase in minimum version, the existing windows binaries are already built with a new enough version. Make configure error out if C99 support could not be detected. For MSVC builds, increase the minimum version to 2013. The increase to MSVC 2013 allows us to get rid of VCBuildProject.pm, as that was only required for MSVC 2005/2008. Author: Andres Freund Discussion: https://postgr.es/m/97d4b165-192d-3605-749c-f614a0c4e783@2ndquadrant.com
2018-06-30perltidy run prior to branchingAndrew Dunstan
2018-05-31Fix compile-time warnings on all perl codeAndrew Dunstan
This patch does two things. First, it silences a number of compile-time warnings in the msvc tools files, mainly those due to the fact that in some cases we have more than one package per file. Second it supplies a dummy Perl library with just enough of the Windows API referred to in our code to let it run these checks cleanly, even on Unix machines where the code is never supposed to run. The dummy library should only be used for that purpose, as its README notes.
2018-05-27Don't fall off the end of perl functionsAndrew Dunstan
This complies with the perlcritic policy Subroutines::RequireFinalReturn, which is a severity 4 policy. Since we only currently check at severity level 5, the policy is raised to that level until we move to level 4 or lower, so that any new infringements will be caught. A small cosmetic piece of tidying of the pgperlcritic script is included. Mike Blackwell Discussion: https://postgr.es/m/CAESHdJpfFm_9wQnQ3koY3c91FoRQsO-fh02za9R3OEMndOn84A@mail.gmail.com
2018-05-09Restrict vertical tightness to parentheses in Perl codeAndrew Dunstan
The vertical tightness settings collapse vertical whitespace between opening and closing brackets (parentheses, square brakets and braces). This can make data structures in particular harder to read, and is not very consistent with our style in non-Perl code. This patch restricts that setting to parentheses only, and reformats all the perl code accordingly. Not applying this to parentheses has some unfortunate effects, so the consensus is to keep the setting for parentheses and not for the others. The diff for this patch does highlight some places where structures should have trailing commas. They can be added manually, as there is no automatic tool to do so. Discussion: https://postgr.es/m/a2f2b87c-56be-c070-bfc0-36288b4b41c1@2ndQuadrant.com
2018-04-27perltidy: Add option --nooutdent-long-quotesPeter Eisentraut
2017-12-09MSVC 2012+: Permit linking to 32-bit, MinGW-built libraries.Noah Misch
Notably, this permits linking to the 32-bit Perl binaries advertised on perl.org, namely Strawberry Perl and ActivePerl. This has a side effect of permitting linking to binaries built with obsolete MSVC versions. By default, MSVC 2012 and later require a "safe exception handler table" in each binary. MinGW-built, 32-bit DLLs lack the relevant exception handler metadata, so linking to them failed with error LNK2026. Restore the semantics of MSVC 2010, which omits the table from a given binary if some linker input lacks metadata. This has no effect on 64-bit builds or on MSVC 2010 and earlier. Back-patch to 9.3 (all supported versions). Reported by Victor Wagner. Discussion: https://postgr.es/m/20160326154321.7754ab8f@wagner.wagner.home
2017-09-25Support building with Visual Studio 2017Andrew Dunstan
Haribabu Kommi, reviewed by Takeshi Ideriha and Christian Ullrich Backpatch to 9.6
2017-08-14Absorb -D_USE_32BIT_TIME_T switch from Perl, if relevant.Tom Lane
Commit 3c163a7fc's original choice to ignore all #define symbols whose names begin with underscore turns out to be too simplistic. On Windows, some Perl installations are built with -D_USE_32BIT_TIME_T, and we must absorb that or we get the wrong result for sizeof(PerlInterpreter). This effectively re-reverts commit ef58b87df, which injected that symbol in a hacky way, making it apply to all of Postgres not just PL/Perl. More significantly, it did so on *all* 32-bit Windows builds, even when the Perl build to be used did not select this option; so that it fails to work properly with some newer Perl builds. By making this change, we would be introducing an ABI break in 32-bit Windows builds; but fortunately we have not used type time_t in any exported Postgres APIs in a long time. So it should be OK, both for PL/Perl itself and for third-party extensions, if an extension library is built with a different _USE_32BIT_TIME_T setting than the core code. Patch by me, based on research by Ashutosh Sharma and Robert Haas. Back-patch to all supported branches, as commit 3c163a7fc was. Discussion: https://postgr.es/m/CANFyU97OVQ3+Mzfmt3MhuUm5NwPU=-FtbNH5Eb7nZL9ua8=rcA@mail.gmail.com
2016-04-29Support building with Visual Studio 2015Andrew Dunstan
Adjust the way we detect the locale. As a result the minumum Windows version supported by VS2015 and later is Windows Vista. Add some tweaks to remove new compiler warnings. Remove documentation references to the now obsolete msysGit. Michael Paquier, somewhat edited by me, reviewed by Christian Ullrich. Backpatch to 9.5
2015-04-27Fix vcbuild failures and chkpass dependency caused by 854adb8Andrew Dunstan
Switching the Windows build scripts to use forward slashes instead of backslashes has caused a couple of issues in VC builds: - The file tree list was not correctly generated, build script generating vcproj file missing tree dependencies when listing items in Filter. - VC builds do not accept file paths with forward slashes, perhaps it could be possible to use a Condition but it seems safer to simply enforce the file paths to use backslashes in the vcproj files. - chkpass had an unneeded dependency with libpgport and libpgcommon to make build succeed but actually it is not necessary as crypt.c is already listed for this project and should be replaced with a fake name as it is a unique file. Michael Paquier
2015-04-25Replace backslashes by forward slashes in MSVC build codePeter Eisentraut
This makes it possible to run some stages of these build scripts on non-Windows systems. That way, we can more easily test whether file moves or makefile changes might break the MSVC build. Peter Eisentraut and Michael Paquier
2014-12-17Clarify the regexp used to detect source files in MSVC builds.Heikki Linnakangas
The old pattern would match files with strange extensions like *.ry or *.lpp. Refactor it to only include files with known extensions, and to make it more readable. Per Andrew Dunstan's suggestion.
2014-05-06pgindent run for 9.4Bruce Momjian
This includes removing tabs after periods in C comments, which was applied to back branches, so this change should not effect backpatching.
2014-02-18Disable RandomizedBaseAddress on MSVC buildsMagnus Hagander
The ASLR in Windows 8/Windows 2012 can break PostgreSQL's shared memory. It doesn't fail every time (which is explained by the Random part in ASLR), but can fail with errors abut failing to reserve shared memory region. MauMau, reviewed by Craig Ringer
2014-01-26Enable building with Visual Studion 2013.Andrew Dunstan
Backpatch to 9.3. Brar Piening.
2013-05-29pgindent run for release 9.3Bruce Momjian
This is the first run of the Perl-based pgindent script. Also update pgindent instructions.
2013-02-06Enable building with Microsoft Visual Studio 2012.Andrew Dunstan
Backpatch to release 9.2 Brar Piening and Noah Misch, reviewed by Craig Ringer.
2012-09-01Restore setting of _USE_32BIT_TIME_T to 32 bit MSVC builds.Andrew Dunstan
This was removed in commit cd004067742ee16ee63e55abfb4acbd5f09fbaab, we're not quite sure why, but there have been reports of crashes due to AS Perl being built with it when we are not, and it certainly seems like the right thing to do. There is still some uncertainty as to why it sometimes fails and sometimes doesn't. Original patch from Owais Khani, substantially reworked and extended by Andrew Dunstan.
2012-07-05Run newly-configured perltidy script on Perl files.Bruce Momjian
Run on HEAD and 9.2.
2012-06-10Run pgindent on 9.2 source tree in preparation for first 9.3Bruce Momjian
commit-fest.
2012-01-03Support for building with MS Visual Studio 2010.Andrew Dunstan
Brar Piening, reviewed by Craig Ringer.