Skip to content

Commit 3322d25

Browse files
committed
Automatically enable CMAKE_POSITION_INDEPENDENT_CODE for hardening flags
1 parent df6fafa commit 3322d25

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

buildbot/configure.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,8 @@ def do_configure(args, passthrough_args):
236236
cmake_cmd += args.cmake_opt
237237

238238
if args.add_security_flags:
239+
if args.add_security_flags != 'none':
240+
cmake_cmd.extend(["-DCMAKE_POSITION_INDEPENDENT_CODE=ON"])
239241
cmake_cmd.extend(["-DEXTRA_SECURITY_FLAGS={}".format(args.add_security_flags)])
240242

241243
# Add path to root CMakeLists.txt

0 commit comments

Comments
 (0)