This is an archive of the discontinued LLVM Phabricator instance.

[clang][slh] Forward mSLH only to Clang CC1
ClosedPublic

Authored by zbrid on Nov 20 2018, 11:26 AM.

Details

Summary

-mno-speculative-load-hardening isn't a cc1 option, therefore,
before this change:

clang -mno-speculative-load-hardening hello.cpp

would have the following error:

error: unknown argument: '-mno-speculative-load-hardening'

This change will only ever forward -mspeculative-load-hardening
which is a CC1 option based on which flag was passed to clang.

Also added a test that uses this option that fails if an error like the
above is ever thrown.

Thank you ericwf for help debugging and fixing this error.

Diff Detail

Repository
rC Clang

Event Timeline

zbrid created this revision.Nov 20 2018, 11:26 AM
EricWF accepted this revision.Nov 20 2018, 1:25 PM

LGTM.

This revision is now accepted and ready to land.Nov 20 2018, 1:25 PM
This revision was automatically updated to reflect the committed changes.