File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -3404,6 +3404,12 @@ function toolset_setup_common_ldlags()
3404
3404
ADD_FLAG ( 'LDFLAGS' , "/GUARD:CF" ) ;
3405
3405
}
3406
3406
}
3407
+ if ( PHP_VS_LINK_COMPAT != "no" ) {
3408
+ // Allow compatible IL versions, do not require an exact match.
3409
+ // Prevents build failures where different libs were built with different (but compatible) IL versions.
3410
+ // See fatal error C1047.
3411
+ ADD_FLAG ( "LDFLAGS" , "/d2:-AllowCompatibleILVersions " ) ;
3412
+ }
3407
3413
}
3408
3414
}
3409
3415
@@ -3753,3 +3759,9 @@ function setup_verbosity()
3753
3759
CMD_MOD2 = "@" ;
3754
3760
}
3755
3761
}
3762
+
3763
+ try {
3764
+ ARG_ENABLE ( 'vs-link-compat' , 'Allow linking of libraries built with compatible versions of VS toolset' , 'yes' ) ;
3765
+ } catch ( e ) {
3766
+ STDOUT . WriteLine ( "problem: " + e ) ;
3767
+ }
You can’t perform that action at this time.
0 commit comments