[PATCH] D60186: Support CLANG_ENABLE_DEFAULT_PIE like gcc --enable-default-pie
Jiang Yi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 3 01:48:41 PDT 2019
jiangyi created this revision.
Herald added subscribers: cfe-commits, mstorsjo, aheejin, jgravelle-google, sbc100, mgorny, dschuff, emaste.
Herald added a project: clang.
GCC 6 added the --enable-defaut-pie flag, which would provide better security with ASLR enabled.
--enable-defaut-pie is enabled by default in many linux distros such as Alpine, Arch, Debian, Fedora, Gentoo, OpenSUSE, Ubuntu...
Add a cmake option CLANG_ENABLE_DEFAULT_PIE to support the same functionality for clang.
A pre-processor macro is placed at clang/Driver/ToolChain.h to conditionally make isPIEDefault() a non-virtual function. By doing so, future subclasses of clang::driver::ToolChain will not accidentally override isPIEDefault() while not taking into account of CLANG_ENABLE_DEFAULT_PIE.
Repository:
rC Clang
https://reviews.llvm.org/D60186
Files:
CMakeLists.txt
include/clang/Config/config.h.cmake
include/clang/Driver/ToolChain.h
lib/Driver/Driver.cpp
lib/Driver/ToolChain.cpp
lib/Driver/ToolChains/BareMetal.h
lib/Driver/ToolChains/CloudABI.cpp
lib/Driver/ToolChains/CloudABI.h
lib/Driver/ToolChains/CommonArgs.cpp
lib/Driver/ToolChains/CrossWindows.cpp
lib/Driver/ToolChains/CrossWindows.h
lib/Driver/ToolChains/Cuda.cpp
lib/Driver/ToolChains/Cuda.h
lib/Driver/ToolChains/Darwin.cpp
lib/Driver/ToolChains/Darwin.h
lib/Driver/ToolChains/FreeBSD.cpp
lib/Driver/ToolChains/FreeBSD.h
lib/Driver/ToolChains/Fuchsia.cpp
lib/Driver/ToolChains/Fuchsia.h
lib/Driver/ToolChains/Gnu.cpp
lib/Driver/ToolChains/Gnu.h
lib/Driver/ToolChains/HIP.h
lib/Driver/ToolChains/Haiku.h
lib/Driver/ToolChains/Hurd.cpp
lib/Driver/ToolChains/Linux.cpp
lib/Driver/ToolChains/Linux.h
lib/Driver/ToolChains/MSP430.h
lib/Driver/ToolChains/MSVC.cpp
lib/Driver/ToolChains/MSVC.h
lib/Driver/ToolChains/MinGW.cpp
lib/Driver/ToolChains/MinGW.h
lib/Driver/ToolChains/OpenBSD.h
lib/Driver/ToolChains/Solaris.cpp
lib/Driver/ToolChains/TCE.cpp
lib/Driver/ToolChains/TCE.h
lib/Driver/ToolChains/WebAssembly.cpp
lib/Driver/ToolChains/WebAssembly.h
lib/Driver/ToolChains/XCore.cpp
lib/Driver/ToolChains/XCore.h
lib/Frontend/CompilerInvocation.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60186.193444.patch
Type: text/x-patch
Size: 21175 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190403/a52e40f5/attachment-0001.bin>
More information about the cfe-commits
mailing list