(Changes since 1.33.0-beta2 are marked with (new).)
Big news
- Frontend, druntime and Phobos are at version 2.103.1, incl. new command-line option
-verror-supplements
. (#4345) - The
--plugin
commandline option now also accepts semantic analysis plugins. Semantic analysis plugins are recognized by exporting the symbol:extern(C) void runSemanticAnalysis(Module m)
. The plugin'srunSemanticAnalysis
function is called for each module, after all other semantic analysis steps (also after DCompute SemA), just before object codegen. (#4430) (new) - New tool
ldc-build-plugin
that helps compiling user plugins. It downloads the correct LDC source version (if it's not already available), and calls LDC with the correct commandline flags to build a plugin. (#4430) (new) - New commandline option
-femit-local-var-lifetime
that enables variable lifetime (scope) annotation to LLVM IR codegen. Lifetime annotation enables stack memory reuse for local variables with non-overlapping scope. (#4395) - C files are now automatically preprocessed using the external C compiler (configurable via
-gcc
or theCC
environment variable, and-Xcc
for extra flags). Extra preprocessor flags (e.g., include dirs and manual defines) can be added via new command-line option-P
. (#4417)- Windows: If
clang-cl.exe
is onPATH
, it is preferred over Microsoft'scl.exe
by default (e.g., to avoid printing the C source file name to stderr during preprocessing).
- Windows: If
- Less pedantic checks for conflicting C(++) function declarations when compiling multiple modules to a single object file ('Error: Function type does not match previously declared function with the same mangled name'). The error now only appears if an object file actually references multiple conflicting functions. (#4420)
- New command-line option
--fcf-protection
, which enables Intel's Control-Flow Enforcement Technology (CET). (#4437) (new)
Platform support
- Supports LLVM 9.0 - 15.0.
Bug fixes
- Handle potential lambda mangle collisions across separately compiled object files (and the linker then silently picking an arbitrary implementation). Lambdas (and their nested global variables) are now internal to each referencing object file (
static
linkage in C). (#4415)