MSVC: Fix the CET parameters
To enable CET for MSVC, only passing "/CETCOMPAT" to the linker should be sufficient. Enabling generation of EH Continuation (EHCONT) metadata is additional protection and should not be necessary. It also requires all the dependencies to be re-compiled with EHCONT enabled, otherwise the linker will refuse to link the obj files. However, this is rather hard to achieve if your application depends on many 3rd-party libraries, so to let people enable CET more freely, we don't enable EHCONT guard by default. Pick-to: 6.4 Change-Id: Iba08a5ec56c474d291991fb751a0de764719bd85 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
dcc691c77d
commit
ce9799e4c4
@ -272,11 +272,8 @@ endif()
|
|||||||
|
|
||||||
if(QT_FEATURE_intelcet)
|
if(QT_FEATURE_intelcet)
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
target_compile_options(PlatformCommonInternal INTERFACE
|
|
||||||
-guard:ehcont
|
|
||||||
)
|
|
||||||
target_link_options(PlatformCommonInternal INTERFACE
|
target_link_options(PlatformCommonInternal INTERFACE
|
||||||
-guard:ehcont -CETCOMPAT
|
-CETCOMPAT
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
target_compile_options(PlatformCommonInternal INTERFACE
|
target_compile_options(PlatformCommonInternal INTERFACE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user