This is an archive of the discontinued LLVM Phabricator instance.

[CMake] Don't use -fno-semantic-interposition with Clang<=13
ClosedPublic

Authored by MaskRay on Jan 12 2022, 10:43 PM.

Details

Summary

Clang 13 has a -fsanitize-coverage -fno-semantic-interposition bug (D117190)
which may lead to
relocation R_X86_64_PC32 cannot be used against symbol linker error
in -DLLVM_USE_SANITIZE_COVERAGE=ON build when a shared object is built (e.g.
-DLLVM_BUILD_LLVM_DYLIB=on).

For simplicity, just disallow Clang 13 entirely.

Note: GCC -fPIC performance benefits from -fno-semantic-interposition
dramatically. Clang benefits little. Using this option is more for a dogfood
purpose to test correctness of this option, because in the wild some important
packages like CPython uses this option.

Diff Detail

Event Timeline

MaskRay created this revision.Jan 12 2022, 10:43 PM
MaskRay requested review of this revision.Jan 12 2022, 10:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 12 2022, 10:43 PM
MaskRay edited the summary of this revision. (Show Details)Jan 12 2022, 10:45 PM
MaskRay edited the summary of this revision. (Show Details)Jan 12 2022, 10:49 PM
MaskRay added a reviewer: tstellar.
ljmf00 accepted this revision.Jan 13 2022, 9:21 AM

Looks good. Isn't this supposed to stack with D117190? I often use the Phabricator related patches feature to stack patches and avoid merging them in the wrong order :)

This revision is now accepted and ready to land.Jan 13 2022, 9:21 AM

Looks good. Isn't this supposed to stack with D117190? I often use the Phabricator related patches feature to stack patches and avoid merging them in the wrong order :)

Technically yes. If we are sure that the issue will be fixed in 14.0.0 the dependency is not needed...

MaskRay updated this revision to Diff 399816.Jan 13 2022, 3:37 PM
MaskRay edited the summary of this revision. (Show Details)

update description and comment

This revision was landed with ongoing or failed builds.Jan 13 2022, 3:38 PM
This revision was automatically updated to reflect the committed changes.