CppCon 2024
Customizing
Compilation Error
Messages
Formatting a Compile-Time String
During Substitution Failure
Patrick Roberts, P.E.
Principal Software Engineer
1CppCon 2024
What problem does
CPPCON / 16TH SEPTEMBER 2020
CPPCON / 16TH SEPTEMBER 2020
JUST-IN-TIME COMPILATION:
JUST-IN-TIME COMPILATION:
THE NEXT BIG THING?
THE NEXT BIG THING?
BEN DEANE & KRIS JUSIAK -
BEN DEANE & KRIS JUSIAK THE COMPILER...
(/LIBRARY) IS THE COMPILER...
JUST-IN-TIME (JIT) IS COMPILATION AT THE POINT OF NEED
JUST-IN-TIME (JIT) IS COMPILATION AT THE POINT OF NEED
3 . 2WHAT IS JITTING?
WHAT IS JITTING?
INSTEAD THE COMPILER...
(/LIBRARY) IS THE COMPILER...
JUST-IN-TIME (JIT) IS COMPILATION AT THE POINT OF NEED
JUST-IN-TIME (JIT) IS COMPILATION AT THE POINT OF NEED
IT'S LIKE THE APPLICATION (/LIBRARY) IS THE COMPILER
build systems
■
xmake
■
bazel
2Outline
1.
What are compilation databases?
2.
How do modules change the status quo?
3.
Build databases
3Compilation Databases: Overview
●
JSON document
●
Array of JSON file (optional)
○
Arguments (list of strings) or command (single string, shell escaped)
4Today: Compilation Databases
●
Specified by the Clang project
○
https://clang.llvm.org/docs/JSONCompilationDatabase IDEs to understand how a source is used (e.g., highlighting the right side of an #if block)
5Compilation Databases: Example
{
"directory": "/path/to/build",
"command": "/usr/lib64/ccache/c++ FLAG_SOUP
Just-in-Time
Compilation
A lecture on the last 60 years
JF Bastien
Software architect
@jfbastien
Presented at CppCon 2020.
Just-in-Time compilers... we've all heard of them! What are they really on the screen than usual, from these papers.
First, some definitions.JiT
JiT
Just-in-Time
compilation
With some artistic liberty, folks usually think of JIT as:
The executable code changes after On modern systems: pages mapped X at some point in time are modified.AoT
AoT
Ahead-of-Time
compilation
Is AoT the opposite of JiT?
C and C++ are pretty much AoT these days: compile code to a target
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1896
105.25
Ahead of Time Compilation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1913
105.26
Static analyzer annotations and good performance, achieved using type inference
and just-in-time (JIT) compilation (and optional ahead-of-time compilation), implemented using LLVM. It
is multi-paradigm, combining features of imperative the actual argument types
passed by the caller. For example, calling fib(1) will trigger the compilation of specialized version of fib
optimized specifically for Int arguments, which is then re-used
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1896
105.25
Ahead of Time Compilation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1913
105.26
Static analyzer annotations and good performance, achieved using type inference
and just-in-time (JIT) compilation (and optional ahead-of-time compilation), implemented using LLVM. It
is multi-paradigm, combining features of imperative the actual argument types
passed by the caller. For example, calling fib(1) will trigger the compilation of specialized version of fib
optimized specifically for Int arguments, which is then re-used
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1896
105.25
Ahead of Time Compilation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1913
105.26
Static analyzer annotations and good performance, achieved using type inference
and just-in-time (JIT) compilation (and optional ahead-of-time compilation), implemented using LLVM. It
is multi-paradigm, combining features of imperative the actual argument types
passed by the caller. For example, calling fib(1) will trigger the compilation of specialized version of fib
optimized specifically for Int arguments, which is then re-used