diff options
author | David Gebler <davidgebler@gmail.com> | 2021-02-02 16:44:21 +0100 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2021-02-03 11:43:38 +0100 |
commit | 7d7fe25003bf36120f163ed245201c7551421aab (patch) | |
tree | f8eae0466fd8d09da79a6f1ab64cd15452c4f9b2 /win32 | |
parent | 8b21e4e95132f1a3331d5469e3dd94958ac5ab8d (diff) | |
download | php-git-7d7fe25003bf36120f163ed245201c7551421aab.tar.gz |
Add IL compat flag to Windows builds
Enabled by default; use `--disable-vs-link-compat` to disable.
Closes GH-6658.
Diffstat (limited to 'win32')
-rw-r--r-- | win32/build/confutils.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/win32/build/confutils.js b/win32/build/confutils.js index 19fbd52aa9..38a5fb75aa 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -3404,6 +3404,12 @@ function toolset_setup_common_ldlags() ADD_FLAG('LDFLAGS', "/GUARD:CF"); } } + if (PHP_VS_LINK_COMPAT != "no") { + // Allow compatible IL versions, do not require an exact match. + // Prevents build failures where different libs were built with different (but compatible) IL versions. + // See fatal error C1047. + ADD_FLAG("LDFLAGS", "/d2:-AllowCompatibleILVersions "); + } } } @@ -3753,3 +3759,9 @@ function setup_verbosity() CMD_MOD2 = "@"; } } + +try { + ARG_ENABLE('vs-link-compat', 'Allow linking of libraries built with compatible versions of VS toolset', 'yes'); +} catch (e) { + STDOUT.WriteLine("problem: " + e); +} |