Skip to content

[SYCL][CMake] Properly enable -pie hardening flag #19447

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion llvm/cmake/modules/AddSecurityFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,10 @@ macro(append_common_extra_security_flags)
# Position Independent Execution
# We rely on CMake to set the right -fPIE flags for us, but it must be
# explicitly requested
if (NOT CMAKE_POSITION_INDEPENDENT_CODE)
if (CMAKE_POSITION_INDEPENDENT_CODE)
include(CheckPIESupported)
check_pie_supported()
else()
message(FATAL_ERROR "To enable all necessary security flags, CMAKE_POSITION_INDEPENDENT_CODE must be set to ON")
endif()

Expand Down
Loading