[PR] Disable stack protection in runtime libraries

Summary:
In some of the system stack protection is enabled by default, which will
lead in extra symbols dependencies, which we want to avoid.

Vladislav Khmelevsky,
Advanced Software Technology Lab, Huawei

(cherry picked from FBD32478426)
This commit is contained in:
Vladislav Khmelevsky 2021-11-16 16:34:33 +03:00 committed by Maksim Panchenko
parent a23726bb33
commit 4e4ef2f3e7
1 changed files with 2 additions and 2 deletions

View File

@ -22,9 +22,9 @@ add_library(bolt_rt_hugify STATIC
)
# Don't let the compiler think it can create calls to standard libs
target_compile_options(bolt_rt_instr PRIVATE -ffreestanding -fno-exceptions -fno-rtti -fPIE)
target_compile_options(bolt_rt_instr PRIVATE -ffreestanding -fno-exceptions -fno-rtti -fno-stack-protector -fPIE)
target_include_directories(bolt_rt_instr PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
target_compile_options(bolt_rt_hugify PRIVATE -ffreestanding -fno-exceptions -fno-rtti)
target_compile_options(bolt_rt_hugify PRIVATE -ffreestanding -fno-exceptions -fno-rtti -fno-stack-protector)
target_include_directories(bolt_rt_hugify PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
install(TARGETS bolt_rt_instr DESTINATION lib)