Page MenuHomePhabricator

Fix unused -pie flag for libs
ClosedPublic

Authored by Fabien on May 28 2020, 18:17.

Details

Reviewers
majcosta
Group Reviewers
Restricted Project
Commits
rABC8298f7e118df: Fix unused -pie flag for libs
Summary

Before cmake 3.14, the -pie linker flag needs to be added manually. It
is currently applied to all targets, despite it is only useful when
linking exectuables. This causes clang to raise a
-Wunused-command-line-argument warning. This diff filters the -pie
flag better to get rid of this warning.

Test Plan

With clang as a compiler:

ninja all security-check

Check the warning is gone.

Diff Detail

Event Timeline

Fabien requested review of this revision.May 28 2020, 18:17
This revision is now accepted and ready to land.May 28 2020, 19:18
Fabien retitled this revision from Fix usused -pie flag for libs to Fix unused -pie flag for libs.May 28 2020, 19:20
This revision was automatically updated to reflect the committed changes.