Closed
Description
The AVR-Rust post continues to track AVR-LLVM, which is tracking upstream LLVM. That means we are running into changes from the future LLVM 4.0. I figured we could open up this issue now to track the changes required to stay compatible.
This is the current list of upgrade hazards. Note that some of the text may be nonsensical as I don't truly grok all the internals of LLVM so some changes are wild stabs in the dark. It's also possible that some failed fix for earlier problems actually caused later problems:
- DIDescriptorFlags became a real C++ enum and not a bitset ([LLVM 4.0] Handle new DIFlags enum #37857)
- An EH personality is required for every function that can unwind ([LLVM 4.0] Set EH personality when resuming stack unwinding #37862)
-
AlwaysInliner
pass changed header and constructor name ([LLVM 4.0] Update AlwaysInliner pass header and constructor #37861) -
createBasicType
changed API ([LLVM 4.0] Move debuginfo alignment argument #38317) - Bitcode/ReaderWriter.h has been renamed / API changed ([LLVM 4.0] New bitcode headers and API #38156)
-
powidf2
/powisf2
calling convention changed (LLVM 31685) -
llvm::AttrBuilder
changed API ([LLVM 4.0] Use llvm::Attribute APIs instead of "raw value" APIs #37831) -
DIBuilder::createNameSpace
changed API ([LLVM 4.0] Pass new argument ExportSymbol to DIBuilder::createNameSpace #38000) -
LLVMRustPrintPasses
prefersStringRef
overchar *
([LLVM 4.0] LLVMRustPrintPasses #38027) -
OptimizationDiagnostic
string type changes ([LLVM 4.0] OptimizationDiagnostic FFI forward compatibility #37982) -
llvm::StringRef
is not guaranteed to be null terminated ([LLVM 4.0] Don't assume llvm::StringRef is null terminated #38048) -
getPassName
changed return types ([LLVM 4.0] test/run-make/llvm-pass/ #38195) - Archive support changed error handling types ([LLVM 4.0] rustllvm archive support #38196)
- Teach Rust about an LLVM 4.0 API change for creating debug info
for global variables ([LLVM 4.0] Update LLVM global variable debug info API for 4.0 #38295) - Check all errors in LLVMRustArchiveIterator API (Check *all* errors in LLVMRustArchiveIterator* API #38676)
- Upgrade emscripten (Update to LLVM 4.0 emscripten-core/emscripten-fastcomp#165, Update to LLVM 4.0 emscripten-core/emscripten-fastcomp-clang#13)
- Alignment now represented with 32 bits instead of 64 ([LLVM 4.0] Use 32-bits for alignment #39529)
-
DIBuilder::createGlobalVariable
API changed again ([LLVM 4.0] Support a debug info API change for LLVM 4.0 #39528) -
llvm::DIBuilder::createCompileUnit
now takes anllvm::DIFile*
instead of aFilename
andDirectory
([LLVM 4.0] Fix CreateCompileUnit #39747) - Symbol lookup error when linking dylibs ([LLVM 4.0] Symbol lookup error when linking dylibs #39782)
- Undefined behavior in
repr(packed)
tests (Fix UB in repr(packed) tests #40373) - Unoptimised builds of compiler_builtins on ARM have references to
core::panicking::panic
(Unoptimised builds of compiler_builtins on ARM have references tocore::panicking::panic
#40508)
A WIP PR that performs the upgrade! #40123
Some issues whose resolution is believed to be blocked on LLVM 4.0:
Metadata
Metadata
Assignees
Labels
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Category: An issue proposing an enhancement or a PR with one.Call for participation: Hard difficulty. Experience needed to fix: A lot.Relevant to the compiler team, which will review and decide on the PR/issue.