This is an archive of the discontinued LLVM Phabricator instance.

[Driver] Accept -fno-lto in clang-cl
ClosedPublic

Authored by aeubanks on Aug 4 2020, 3:31 PM.

Details

Summary

Some compiler-rt tests check for the presence of the compiler accepting
-fno-lto to add that flag. Otherwise some tests don't link due to
-flto mismatch between compiling and linking.

$ cmake ... -DLLVM_ENABLE_LTO=Thin ...
$ ninja projects/compiler-rt/lib/sanitizer_common/tests/Sanitizer-x86_64-Test.exe
previously failed, now links.

Diff Detail

Event Timeline

aeubanks created this revision.Aug 4 2020, 3:31 PM
aeubanks requested review of this revision.Aug 4 2020, 3:31 PM
hans accepted this revision.Aug 5 2020, 10:25 AM

lgtm

In general when -ffoo is supported by clang-cl, -fno-foo should be too, so this makes sense.

This revision is now accepted and ready to land.Aug 5 2020, 10:25 AM
This revision was automatically updated to reflect the committed changes.