1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/cmake/modules
Fangrui Song fcb0b24958 [CMake][ELF] Add -fno-semantic-interposition for GCC and Clang>=13
In a `-DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_LINK_LLVM_DYLIB=on -DCLANG_LINK_CLANG_DYLIB=on`
build, libLLVM-13git.so is 2% smaller and libclang-cpp.so is 1% smaller (on top of -Wl,-Bsymbolic-functions).
There may be some small performance improvement as well because GCC
-fPIC suppresses interprocedural optimizations for non-inline
definitions by default.

Note: we cannot add -fno-semantic-interposition for Clang<13.  Clang<13's
implementation additionally optimizes global variables, which is incompatible
with unfortunate ELF -fno-pic default: direct access relocations for external
data. If the executable has a -fno-pic object file referencing a global variable
declared in a public header, the direct access relocation will cause a copy
relocation. The executable and libLLVM.so/libclang-cpp.so will disagree on the
address.

Reviewed By: phosek

Differential Revision: https://reviews.llvm.org/D102453
2021-06-03 15:26:34 -07:00
..
AddLLVM.cmake [CMake] Don't LTO optimize targets that aren't part of any distribution 2021-05-19 15:02:11 -07:00
AddLLVMDefinitions.cmake
AddOCaml.cmake
AddSphinxTarget.cmake Reland [lldb][docs] Use sphinx instead of epydoc to generate LLDB's Python reference 2021-01-17 12:13:01 +01:00
CheckAtomic.cmake Fix CMake configuration error when run with -Werror/-Wall 2020-10-10 21:22:40 +02:00
CheckCompilerVersion.cmake Bump MSVC required version to 19.14 2020-12-03 10:09:18 -08:00
ChooseMSVCCRT.cmake
CMakeLists.txt [cmake] Add support for multiple distributions 2021-05-12 11:13:18 -07:00
CrossCompile.cmake
DetermineGCCCompatible.cmake
FindGRPC.cmake [CMake][gRPC] Fix a typo in protobuf version variable name 2021-03-26 19:33:06 +03:00
FindLibpfm.cmake [llvm-exegesis] Check perf_branch_entry for field cycles 2020-07-27 11:31:13 -04:00
FindOCaml.cmake
FindSphinx.cmake
FindZ3.cmake
GenerateVersionFromVCS.cmake
GetErrcMessages.cmake [CMAKE] Fix cross-compilation build 2021-03-23 13:24:08 +03:00
GetHostTriple.cmake [SystemZ/ZOS] Additions to the build system. 2020-08-26 06:53:44 -04:00
GetLibraryName.cmake [CMake] Simplify CMake handling for libxml2 2020-09-09 21:44:44 -07:00
HandleLLVMOptions.cmake [CMake][ELF] Add -fno-semantic-interposition for GCC and Clang>=13 2021-06-03 15:26:34 -07:00
HandleLLVMStdlib.cmake [CMake][llvm] avoid conflict w/ (and use when available) new builtin check_linker_flag 2021-04-27 16:41:28 -07:00
LLVM-Build.cmake [llvmbuildectomy] Also include component groups in llvm-config --components list 2020-11-26 21:05:56 +01:00
LLVM-Config.cmake [ASTMatchers] Fix build when no targets are enabled 2021-01-05 14:40:35 +00:00
LLVMCheckLinkerFlag.cmake [CMake][llvm] add missing include to LLVMCheckLinkerFlag 2021-04-27 18:48:52 -07:00
LLVMConfig.cmake.in Fix lld macho standalone build by including llvm/Config/llvm-config.h instead of llvm/Config/config.h 2021-05-19 11:15:07 -04:00
LLVMConfigVersion.cmake.in Revert "[CMake] Use write_basic_package_version_file for LLVM" 2021-03-29 13:07:39 -07:00
LLVMDistributionSupport.cmake [CMake] Don't LTO optimize targets that aren't part of any distribution 2021-05-19 15:02:11 -07:00
LLVMExternalProjectUtils.cmake [runtimes] Fix crosscompiling after a7cad6680b4087eff8994f1f99ac40c661a6621f (D97451) 2021-03-06 11:35:14 +02:00
LLVMInstallSymlink.cmake [CMake] try creating symlink first on windows 2021-04-07 11:23:10 +02:00
LLVMProcessSources.cmake
TableGen.cmake [CMake][TableGen] Remove dead CMake version checks 2020-09-07 10:59:07 +03:00
TensorFlowCompile.cmake [mlgo] Skip AOT-compiling a model if a header/object pair is provided 2021-04-13 09:46:29 -07:00
UseLibtool.cmake
VersionFromVCS.cmake