forked from OSchip/llvm-project
34b60d8a56
There are two use cases. Assembler We have accrued some code gated on MCAsmInfo::useIntegratedAssembler(). Some features are supported by latest GNU as, but we have to use MCAsmInfo::useIntegratedAs() because the newer versions have not been widely adopted (e.g. SHF_LINK_ORDER 'o' and 'unique' linkage in 2.35, --compress-debug-sections= in 2.26). Linker We want to use features supported only by LLD or very new GNU ld, or don't want to work around older GNU ld. We currently can't represent that "we don't care about old GNU ld". You can find such workarounds in a few other places, e.g. Mips/MipsAsmprinter.cpp PowerPC/PPCTOCRegDeps.cpp X86/X86MCInstrLower.cpp AArch64 TLS workaround for R_AARCH64_TLSLD_MOVW_DTPREL_* (PR ld/18276), R_AARCH64_TLSLE_LDST8_TPREL_LO12 (https://bugs.llvm.org/show_bug.cgi?id=36727 https://sourceware.org/bugzilla/show_bug.cgi?id=22969) Mixed SHF_LINK_ORDER and non-SHF_LINK_ORDER components (supported by LLD in D84001; GNU ld feature request https://sourceware.org/bugzilla/show_bug.cgi?id=16833 may take a while before available). This feature allows to garbage collect some unused sections (e.g. fragmented .gcc_except_table). This patch adds `-fbinutils-version=` to clang and `-binutils-version` to llc. It changes one codegen place in SHF_MERGE to demonstrate its usage. `-fbinutils-version=2.35` means the produced object file does not care about GNU ld<2.35 compatibility. When `-fno-integrated-as` is specified, the produced assembly can be consumed by GNU as>=2.35, but older versions may not work. `-fbinutils-version=none` means that we can use all ELF features, regardless of GNU as/ld support. Both clang and llc need `parseBinutilsVersion`. Such command line parsing is usually implemented in `llvm/lib/CodeGen/CommandFlags.cpp` (LLVMCodeGen), however, ClangCodeGen does not depend on LLVMCodeGen. So I add `parseBinutilsVersion` to `llvm/lib/Target/TargetMachine.cpp` (LLVMTarget). Differential Revision: https://reviews.llvm.org/D85474 |
||
---|---|---|
.. | ||
CommandGuide | ||
analyzer | ||
tools | ||
APINotes.rst | ||
AddressSanitizer.rst | ||
AutomaticReferenceCounting.rst | ||
Block-ABI-Apple.rst | ||
Block-ABI-Apple.txt | ||
BlockLanguageSpec.rst | ||
CMakeLists.txt | ||
ClangCheck.rst | ||
ClangCommandLineReference.rst | ||
ClangFormat.rst | ||
ClangFormatStyleOptions.rst | ||
ClangFormattedStatus.rst | ||
ClangOffloadBundler.rst | ||
ClangPlugins.rst | ||
ClangStaticAnalyzer.rst | ||
ClangTools.rst | ||
ConstantInterpreter.rst | ||
ControlFlowIntegrity.rst | ||
ControlFlowIntegrityDesign.rst | ||
CrossCompilation.rst | ||
DataFlowSanitizer.rst | ||
DataFlowSanitizerDesign.rst | ||
DiagnosticsReference.rst | ||
DriverArchitecture.png | ||
DriverInternals.rst | ||
ExternalClangExamples.rst | ||
FAQ.rst | ||
HardwareAssistedAddressSanitizerDesign.rst | ||
HowToSetupToolingForLLVM.rst | ||
InternalsManual.rst | ||
IntroductionToTheClangAST.rst | ||
ItaniumMangleAbiTags.rst | ||
JSONCompilationDatabase.rst | ||
LTOVisibility.rst | ||
LanguageExtensions.rst | ||
LeakSanitizer.rst | ||
LibASTImporter.rst | ||
LibASTMatchers.rst | ||
LibASTMatchersReference.html | ||
LibASTMatchersTutorial.rst | ||
LibFormat.rst | ||
LibTooling.rst | ||
MSVCCompatibility.rst | ||
Makefile.sphinx | ||
MatrixTypes.rst | ||
MemorySanitizer.rst | ||
Modules.rst | ||
ObjectiveCLiterals.rst | ||
OpenCLSupport.rst | ||
OpenMPSupport.rst | ||
PCHInternals.rst | ||
PCHLayout.graffle | ||
PCHLayout.png | ||
RAVFrontendAction.rst | ||
README.txt | ||
RefactoringEngine.rst | ||
ReleaseNotes.rst | ||
SafeStack.rst | ||
SanitizerCoverage.rst | ||
SanitizerSpecialCaseList.rst | ||
SanitizerStats.rst | ||
ShadowCallStack.rst | ||
SourceBasedCodeCoverage.rst | ||
ThinLTO.rst | ||
ThreadSafetyAnalysis.rst | ||
ThreadSanitizer.rst | ||
Toolchain.rst | ||
Tooling.rst | ||
UndefinedBehaviorSanitizer.rst | ||
UsersManual.rst | ||
conf.py | ||
doxygen-mainpage.dox | ||
doxygen.cfg.in | ||
index.rst | ||
make.bat |
README.txt
See llvm/docs/README.txt