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
packages. The packages are created by the client, and if binaries are built from sources, that compilation is also done by the client application. 3 Conan Documentation, Release 2.5.0 The different applications control over builds: Building all binaries yourself ensures you have complete control over the compilation environment and dependency versions. Instead, it’s recommended to build all your direct and transitive packages. It will also add a prebuild event to the project to install those libraries on the next compilation of the project. At any point, you can also use the refresh button (circular arrow icon) to update
packages. The packages are created by the client, and if binaries are built from sources, that compilation is also done by the client application. 3 Conan Documentation, Release 2.3.2 The different applications control over builds: Building all binaries yourself ensures you have complete control over the compilation environment and dependency versions. Instead, it’s recommended to build all your direct and transitive packages. It will also add a prebuild event to the project to install those libraries on the next compilation of the project. At any point, you can also use the refresh button (circular arrow icon) to update
packages. The packages are created by the client, and if binaries are built from sources, that compilation is also done by the client application. 3 Conan Documentation, Release 2.4.1 The different applications control over builds: Building all binaries yourself ensures you have complete control over the compilation environment and dependency versions. Instead, it’s recommended to build all your direct and transitive packages. It will also add a prebuild event to the project to install those libraries on the next compilation of the project. At any point, you can also use the refresh button (circular arrow icon) to update